From 94d32420b5f84220e8a9d2e92cf42b2195efd524 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 22 Jan 2015 17:54:51 +0700 Subject: [PATCH] improve --- netforce_clinic/layouts/clinic_schedule_copy_form.xml | 2 +- netforce_clinic/layouts/clinic_schedule_form.xml | 3 ++- netforce_clinic/models/schedule.py | 1 + netforce_clinic/models/schedule_line.py | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/netforce_clinic/layouts/clinic_schedule_copy_form.xml b/netforce_clinic/layouts/clinic_schedule_copy_form.xml index 0152c54..7bce9ad 100644 --- a/netforce_clinic/layouts/clinic_schedule_copy_form.xml +++ b/netforce_clinic/layouts/clinic_schedule_copy_form.xml @@ -1,4 +1,4 @@ -
+ diff --git a/netforce_clinic/layouts/clinic_schedule_form.xml b/netforce_clinic/layouts/clinic_schedule_form.xml index 5cb480a..7a7cce9 100644 --- a/netforce_clinic/layouts/clinic_schedule_form.xml +++ b/netforce_clinic/layouts/clinic_schedule_form.xml @@ -19,8 +19,9 @@ - + + diff --git a/netforce_clinic/models/schedule.py b/netforce_clinic/models/schedule.py index 2f6ec44..a8329d4 100644 --- a/netforce_clinic/models/schedule.py +++ b/netforce_clinic/models/schedule.py @@ -225,6 +225,7 @@ class Schedule(Model): nurse_id=line['nurse_id'] nurse=get_model("clinic.staff").browse(nurse_id) line['level_id']=nurse.level_id.id + line['state']=nurse.state return data def create(self,vals,**kw): diff --git a/netforce_clinic/models/schedule_line.py b/netforce_clinic/models/schedule_line.py index c20aa47..d94bd7e 100644 --- a/netforce_clinic/models/schedule_line.py +++ b/netforce_clinic/models/schedule_line.py @@ -22,6 +22,7 @@ class ScheduleLine(Model): "nurse_id": fields.Many2One("clinic.staff","Nurse",domain=[['type','=','nurse']]), 'level_id': fields.Many2One("clinic.staff.level","Level",function="_get_level"), 'note': fields.Text("Note"), + "state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True), } ScheduleLine.register()