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