diff --git a/netforce_clinic/models/staff.py b/netforce_clinic/models/staff.py index 46dbd9f..4156209 100644 --- a/netforce_clinic/models/staff.py +++ b/netforce_clinic/models/staff.py @@ -203,6 +203,13 @@ class Staff(Model): def _get_departments(self,context={}): res=get_model('select.company').get_select() + type=context.get("type") + if type=='doctor': + user_id=get_active_user() + set_active_user(1) + dpts=get_model("clinic.department").search([]) + set_active_user(user_id) + return dpts if res: if res.get("department_ids"): return res['department_ids']