compute labor cost
							parent
							
								
									95ffcde823
								
							
						
					
					
						commit
						cd53611e49
					
				| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
        <field name="date_to" span="2"/>
 | 
			
		||||
        <field name="branch_id" onchange="onchange_branch" span="2"/>
 | 
			
		||||
        <field name="department_id" domain='[["branch_id","=",branch_id]]' span="2"/>
 | 
			
		||||
        <field name="state" span="2"/>
 | 
			
		||||
        <field name="work_state" span="2"/>
 | 
			
		||||
    </group>
 | 
			
		||||
    <tabs>
 | 
			
		||||
        <tab string="Doctors">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,8 +91,8 @@ class LaborCostEntry(Model):
 | 
			
		|||
            dom.append(['labor_cost_id.cycle_item_id.branch_id','=',obj.branch_id.id])
 | 
			
		||||
        if obj.department_id:
 | 
			
		||||
            dom.append(['labor_cost_id.cycle_item_id.department_id','=',obj.department_id.id])
 | 
			
		||||
        if obj.state:
 | 
			
		||||
            dom.append(['staff_id.state','=',obj.state])
 | 
			
		||||
        if obj.work_state:
 | 
			
		||||
            dom.append(['staff_id.state','=',obj.work_state])
 | 
			
		||||
        for lc_id in get_model("clinic.labor.cost.line").search(dom):
 | 
			
		||||
            line_ids.append(lc_id)
 | 
			
		||||
        staffs={}
 | 
			
		||||
| 
						 | 
				
			
			@ -183,7 +183,7 @@ class LaborCostEntry(Model):
 | 
			
		|||
 | 
			
		||||
        for line in obj.lines:
 | 
			
		||||
            line.delete()
 | 
			
		||||
 | 
			
		||||
        print('lines ', lines)
 | 
			
		||||
        obj.write({
 | 
			
		||||
            'lines': lines,
 | 
			
		||||
        })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue