diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 2c9b7c3..6ffdfe8 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -1058,6 +1058,10 @@ class HDCase(Model): def undo(self,ids,context={}): obj=self.browse(ids)[0] + # recompute labor cost + lc=get_model("clinic.labor.cost").search_browse([['cycle_item_id','=',obj.cycle_item_id.id]]) + if lc: + lc.compute() context['is_decrease']=True # in case to draft obj.update_usetime(context=context) diff --git a/netforce_clinic/models/report_labor_cost_summary.py b/netforce_clinic/models/report_labor_cost_summary.py index 1bcc0d6..971069c 100644 --- a/netforce_clinic/models/report_labor_cost_summary.py +++ b/netforce_clinic/models/report_labor_cost_summary.py @@ -134,6 +134,7 @@ class ReportLaborCostSummary(Model): dpt=citem.department_id qty=line.qty or 0 total_hdcase+=qty + print("total_hdcase ", total_hdcase) amt=line.amount or 0 staff=line.staff_id categ_name=''