recompute labor cost in case to draft
parent
1b1448f73e
commit
091e327db3
|
@ -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)
|
||||
|
|
|
@ -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=''
|
||||
|
|
Loading…
Reference in New Issue