From e761b955bbcb9afc3ecc690c60a1c1d288b7163b Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Tue, 9 Dec 2014 07:11:39 +0700 Subject: [PATCH] labor cost item --- netforce_clinic/actions/clinic_labor_cost.xml | 2 +- netforce_clinic/actions/clinic_labor_cost_item.xml | 6 ++++++ .../layouts/clinic_labor_cost_line_form.xml | 7 +++++++ .../layouts/clinic_labor_cost_line_list.xml | 7 +++++++ netforce_clinic/layouts/clinic_menu_inherit.xml | 1 + netforce_clinic/models/labor_cost_line.py | 12 ++++++------ 6 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 netforce_clinic/actions/clinic_labor_cost_item.xml create mode 100644 netforce_clinic/layouts/clinic_labor_cost_line_form.xml create mode 100644 netforce_clinic/layouts/clinic_labor_cost_line_list.xml diff --git a/netforce_clinic/actions/clinic_labor_cost.xml b/netforce_clinic/actions/clinic_labor_cost.xml index 87b84e9..ee9bdc9 100644 --- a/netforce_clinic/actions/clinic_labor_cost.xml +++ b/netforce_clinic/actions/clinic_labor_cost.xml @@ -1,5 +1,5 @@ - Labor Costs + Labor Cost multi_view clinic.labor.cost account_menu diff --git a/netforce_clinic/actions/clinic_labor_cost_item.xml b/netforce_clinic/actions/clinic_labor_cost_item.xml new file mode 100644 index 0000000..9144e5b --- /dev/null +++ b/netforce_clinic/actions/clinic_labor_cost_item.xml @@ -0,0 +1,6 @@ + + Labor Cost Items + multi_view + clinic.labor.cost.line + account_menu + diff --git a/netforce_clinic/layouts/clinic_labor_cost_line_form.xml b/netforce_clinic/layouts/clinic_labor_cost_line_form.xml new file mode 100644 index 0000000..8475905 --- /dev/null +++ b/netforce_clinic/layouts/clinic_labor_cost_line_form.xml @@ -0,0 +1,7 @@ +
+ + + + + + diff --git a/netforce_clinic/layouts/clinic_labor_cost_line_list.xml b/netforce_clinic/layouts/clinic_labor_cost_line_list.xml new file mode 100644 index 0000000..42ea8d9 --- /dev/null +++ b/netforce_clinic/layouts/clinic_labor_cost_line_list.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/netforce_clinic/layouts/clinic_menu_inherit.xml b/netforce_clinic/layouts/clinic_menu_inherit.xml index 2e22da0..856bee3 100644 --- a/netforce_clinic/layouts/clinic_menu_inherit.xml +++ b/netforce_clinic/layouts/clinic_menu_inherit.xml @@ -2,6 +2,7 @@ +
diff --git a/netforce_clinic/models/labor_cost_line.py b/netforce_clinic/models/labor_cost_line.py index a0b440d..e96a9a5 100644 --- a/netforce_clinic/models/labor_cost_line.py +++ b/netforce_clinic/models/labor_cost_line.py @@ -3,19 +3,19 @@ from netforce.access import get_active_company class LaborCostLine(Model): _name="clinic.labor.cost.line" - _string="Labor Cost Line" + _string="Labor Cost Item" _name_field="labor_cost_id" _fields={ "labor_cost_id": fields.Many2One("clinic.labor.cost","Cycle Item",required=True), - 'staff_id': fields.Many2One("clinic.staff", "Staff"), - 'level_id': fields.Many2One("clinic.staff.level", "Level"), - 'cycle_id': fields.Many2One("clinic.cycle", "Cycle"), + 'staff_id': fields.Many2One("clinic.staff", "Staff",search=True), + 'level_id': fields.Many2One("clinic.staff.level", "Level",search=True), + 'cycle_id': fields.Many2One("clinic.cycle", "Cycle",search=True), + "type": fields.Selection([('staff','Staff'),("doctor","Doctor"),('nurse','Nurse')],"Type",search=True), 'qty': fields.Integer("Qty"), 'rate': fields.Float("Rate",scale=2), 'amount': fields.Float("Amount",scale=2), - 'date': fields.Date("Date"), - "type": fields.Selection([('staff','Staff'),("doctor","Doctor"),('nurse','Nurse')],"Type",required=True), + 'date': fields.Date("Date",search=True), 'company_id': fields.Many2One('company','Company'), }