From 92604cd73ec0b11d4dae48357d06f69ac0aa4679 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 21 Sep 2016 11:59:17 +0700 Subject: [PATCH] edit staff but effect to level (permission) --- netforce_clinic/models/staff.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netforce_clinic/models/staff.py b/netforce_clinic/models/staff.py index 7195774..46dbd9f 100644 --- a/netforce_clinic/models/staff.py +++ b/netforce_clinic/models/staff.py @@ -32,6 +32,8 @@ class Staff(Model): def _get_rotation(self,ids,context={}): res={} + user_id=get_active_user() + set_active_user(1) for obj in self.browse(ids): wage=0 max_cycle=0 @@ -52,6 +54,7 @@ class Staff(Model): 'level_id': level_id, 'categ_id': categ_id, } + set_active_user(user_id) return res def _get_hdcase(self,ids,context={}):