diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index ac0dbc6..4205754 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -1324,6 +1324,10 @@ class HDCase(Model): doctor+= 1 else: nurse+=1 + if not doctor_id: + for ps in obj.staffs: + if ps.type=="doctor": + doctor_id=ps.staff_id.id res[obj.id]={ 'total_doctor': doctor, 'total_nurse': nurse, diff --git a/netforce_clinic/models/report_labor_cost_staff.py b/netforce_clinic/models/report_labor_cost_staff.py index a764077..dca1bde 100644 --- a/netforce_clinic/models/report_labor_cost_staff.py +++ b/netforce_clinic/models/report_labor_cost_staff.py @@ -83,6 +83,7 @@ class ReportLaborCostStaff(Model): if cycle_id: dom.append(['hd_case_id.cycle_id','=',cycle_id]) lines=[] + print('dom ', dom) for sline in get_model("clinic.hd.case.staff").search_browse(dom): hdcase=sline.hd_case_id staff=sline.staff_id