From cd53611e49a3c520dde6f42926ed660b6af60473 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Mon, 2 Feb 2015 21:56:24 +0700 Subject: [PATCH] compute labor cost --- netforce_clinic/layouts/clinic_labor_cost_entry_form.xml | 2 +- netforce_clinic/models/labor_cost_entry.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netforce_clinic/layouts/clinic_labor_cost_entry_form.xml b/netforce_clinic/layouts/clinic_labor_cost_entry_form.xml index 50c04bc..f19a2f9 100644 --- a/netforce_clinic/layouts/clinic_labor_cost_entry_form.xml +++ b/netforce_clinic/layouts/clinic_labor_cost_entry_form.xml @@ -12,7 +12,7 @@ - + diff --git a/netforce_clinic/models/labor_cost_entry.py b/netforce_clinic/models/labor_cost_entry.py index 084bcfc..5ac11c5 100644 --- a/netforce_clinic/models/labor_cost_entry.py +++ b/netforce_clinic/models/labor_cost_entry.py @@ -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, })