From 89f38036d1f1483c353d86310d628f72a08006df Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Mon, 29 Jun 2015 11:51:56 +0700 Subject: [PATCH] fix --- netforce_clinic/models/setting.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index 9c92503..e8ebaa2 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -314,8 +314,14 @@ class ClinicSetting(Model): 'staff_id': obj.staff_to_id.id, }) #del_staff=obj.staff_from_id.name + obj.staff_from_id.write({ + 'active': False, + }) + obj.write({ + 'staff_from_id': None, + }) # delete staff - get_model('clinic.staff').delete([obj.staff_from_id.id]) + #get_model('clinic.staff').delete([obj.staff_from_id.id]) print("Done!") def del_duplicate_staff(self,ids,context={}):