diff --git a/netforce_clinic/layouts/clinic_doctor_form.xml b/netforce_clinic/layouts/clinic_doctor_form.xml index f5ecef8..6cd9765 100644 --- a/netforce_clinic/layouts/clinic_doctor_form.xml +++ b/netforce_clinic/layouts/clinic_doctor_form.xml @@ -8,10 +8,9 @@ - - + diff --git a/netforce_clinic/layouts/clinic_doctor_list.xml b/netforce_clinic/layouts/clinic_doctor_list.xml index e3fb4d1..a6ea335 100644 --- a/netforce_clinic/layouts/clinic_doctor_list.xml +++ b/netforce_clinic/layouts/clinic_doctor_list.xml @@ -1,6 +1,7 @@ - + + diff --git a/netforce_clinic/layouts/clinic_nurse_form.xml b/netforce_clinic/layouts/clinic_nurse_form.xml index 0c615d2..8c5212b 100644 --- a/netforce_clinic/layouts/clinic_nurse_form.xml +++ b/netforce_clinic/layouts/clinic_nurse_form.xml @@ -7,7 +7,6 @@ - diff --git a/netforce_clinic/layouts/clinic_nurse_list.xml b/netforce_clinic/layouts/clinic_nurse_list.xml index 70825a6..c341d8a 100644 --- a/netforce_clinic/layouts/clinic_nurse_list.xml +++ b/netforce_clinic/layouts/clinic_nurse_list.xml @@ -1,6 +1,5 @@ - diff --git a/netforce_clinic/models/clinic_doctor.py b/netforce_clinic/models/clinic_doctor.py index babab32..29cee6c 100644 --- a/netforce_clinic/models/clinic_doctor.py +++ b/netforce_clinic/models/clinic_doctor.py @@ -11,7 +11,7 @@ class Doctor(Model): _multi_company=True _fields={ "number": fields.Char("Doctor No.",required=True,search=True), - "name": fields.Char("First name",required=True,search=True), + "first_name": fields.Char("First name",required=True,search=True), "last_name" : fields.Char("Last name",required=False), "date": fields.Date("Create Date",required=True,search=True), "card_id" : fields.Char("Identity ID"), @@ -23,11 +23,11 @@ class Doctor(Model): #"licen" : fields.char("licens medicine No."), "number2" : fields.Char("Certificate No."), "licen_issued" : fields.Date("Issued on"), - "birthday": fields.Date("BirthDay",required=True,search=True), - "telephone": fields.Char("Telephone",required=True,search=True), - "department_id": fields.Many2One("clinic.department", "Department",required=True,search=True), - "mobile": fields.Char("Mobile",required=True,search=True), - "state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True), + "birthday": fields.Date("BirthDay",search=True), + "telephone": fields.Char("Telephone",search=True), + "department_id": fields.Many2One("clinic.department", "Department",search=True), + "mobile": fields.Char("Mobile",search=True), + "state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"), "addresses" : fields.One2Many("address","related_id","Addresses"), "comments" : fields.One2Many("message","related_id","Comments"), "patients" : fields.Many2Many("clinic.patient","Patients"), @@ -55,7 +55,12 @@ class Doctor(Model): } _order="date desc,number desc" - + def name_get(self,ids,context={}): + vals=[] + for obj in self.browse(ids): + name='%s %s'%(obj.first_name or "", obj.last_name or "") + vals.append((obj.id,name)) + return vals def void(self,ids,context={}): obj=self.browse(ids)[0] diff --git a/netforce_clinic/models/clinic_nurse.py b/netforce_clinic/models/clinic_nurse.py index 70d7368..64c7a19 100644 --- a/netforce_clinic/models/clinic_nurse.py +++ b/netforce_clinic/models/clinic_nurse.py @@ -15,20 +15,19 @@ class Nurse(Model): "name": fields.Char("First name",required=True,search=True), #"last_name" : fields.char("Last name"), "lname" : fields.Char("Last name"), - "date": fields.Date("Create Date",required=True,search=True), "card_id" : fields.Char("Identity ID"), "card_expire" : fields.Date("Expire Date"), - "birthday": fields.Date("Date of Birth",required=False,search=True), - "telephone": fields.Char("Telephone",required=False,search=True), + "birthday": fields.Date("Date of Birth",search=True), + "telephone": fields.Char("Telephone",search=True), "department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Department"), "mobile": fields.Char("Mobile",required=False,search=True), "number2" : fields.Char("Certificate No."), "licen_issued" : fields.Date("Issued on"), - "birthday": fields.Date("BirthDay",required=True,search=True), - "telephone": fields.Char("Telephone",required=True,search=True), - "department_id": fields.Many2One("clinic.department", "Department",required=True,search=True), - "mobile": fields.Char("Mobile",required=True,search=True), - "state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True), + "birthday": fields.Date("BirthDay",search=True), + "telephone": fields.Char("Telephone",search=True), + "department_id": fields.Many2One("clinic.department", "Department",search=True), + "mobile": fields.Char("Mobile",search=True), + "state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"), "addresses": fields.One2Many("address","related_id","Addresses"), "comments": fields.One2Many("message","related_id","Comments"), "patients": fields.Many2Many("clinic.patient","Patients"),