diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 74db761..8ffae5a 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -37,10 +37,11 @@ - - - - + + + + +
diff --git a/netforce_clinic/layouts/clinic_setting.xml b/netforce_clinic/layouts/clinic_setting.xml index 638c1a0..023b359 100644 --- a/netforce_clinic/layouts/clinic_setting.xml +++ b/netforce_clinic/layouts/clinic_setting.xml @@ -6,9 +6,9 @@ - - - + + +
diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py index e88ba37..8e8c58e 100644 --- a/netforce_clinic/models/setting.py +++ b/netforce_clinic/models/setting.py @@ -5,7 +5,7 @@ import xlrd import xmltodict from netforce.model import Model, fields, get_model -from netforce.utils import get_file_path +from netforce.utils import get_file_path, get_data_path from netforce.access import get_active_company class ClinicSetting(Model): @@ -278,5 +278,15 @@ class ClinicSetting(Model): hd_case.complete() print("%s is completed"%hd_case.number) count+=1 + + def onchange_line(self,context={}): + data=context['data'] + path=context['path'] + line=get_data_path(data,path,parent=True) + var_a=line['var_a'] or '' + var_b=line['var_b'] or '' + op=line['op'] or '' + line['formular']='%sX%s%s'%(var_a,op,var_b) + return data ClinicSetting.register() diff --git a/netforce_clinic/models/staff_level.py b/netforce_clinic/models/staff_level.py index 30ff865..fc646da 100644 --- a/netforce_clinic/models/staff_level.py +++ b/netforce_clinic/models/staff_level.py @@ -15,7 +15,7 @@ class StaffLevel(Model): _defaults={ "company_id": lambda *a: get_active_company(), 'sequence': 0, - 'type': 'staff', + 'type': 'nurse', } _order="sequence"