alwary share doctor for every location after created by anyone

report_acc_hdcase_summary
watcha.h 2016-10-13 07:42:14 +07:00
parent 92604cd73e
commit fc4eb27a94
1 changed files with 7 additions and 0 deletions

View File

@ -203,6 +203,13 @@ class Staff(Model):
def _get_departments(self,context={}): def _get_departments(self,context={}):
res=get_model('select.company').get_select() 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:
if res.get("department_ids"): if res.get("department_ids"):
return res['department_ids'] return res['department_ids']