compute labor cost

conv_bal
watcha.h 2015-02-02 21:56:24 +07:00
parent 95ffcde823
commit cd53611e49
2 changed files with 4 additions and 4 deletions

View File

@ -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">

View File

@ -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,
})