recompute labor cost in case to draft
							parent
							
								
									1b1448f73e
								
							
						
					
					
						commit
						091e327db3
					
				| 
						 | 
					@ -1058,6 +1058,10 @@ class HDCase(Model):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def undo(self,ids,context={}):
 | 
					    def undo(self,ids,context={}):
 | 
				
			||||||
        obj=self.browse(ids)[0]
 | 
					        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
 | 
					        context['is_decrease']=True
 | 
				
			||||||
        # in case to draft
 | 
					        # in case to draft
 | 
				
			||||||
        obj.update_usetime(context=context)
 | 
					        obj.update_usetime(context=context)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -134,6 +134,7 @@ class ReportLaborCostSummary(Model):
 | 
				
			||||||
            dpt=citem.department_id
 | 
					            dpt=citem.department_id
 | 
				
			||||||
            qty=line.qty or 0
 | 
					            qty=line.qty or 0
 | 
				
			||||||
            total_hdcase+=qty
 | 
					            total_hdcase+=qty
 | 
				
			||||||
 | 
					            print("total_hdcase ", total_hdcase)
 | 
				
			||||||
            amt=line.amount or 0
 | 
					            amt=line.amount or 0
 | 
				
			||||||
            staff=line.staff_id
 | 
					            staff=line.staff_id
 | 
				
			||||||
            categ_name=''
 | 
					            categ_name=''
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue