xxxx
parent
005e8be69b
commit
918d2f1353
|
@ -8,10 +8,9 @@
|
||||||
<separator string="Doctor Information"/>
|
<separator string="Doctor Information"/>
|
||||||
<group span="12" colunm="2">
|
<group span="12" colunm="2">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="date"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group span="12" colunm="2">
|
<group span="12" colunm="2">
|
||||||
<field name="name"/>
|
<field name="first_name"/>
|
||||||
<field name="last_name"/>
|
<field name="last_name"/>
|
||||||
</group>
|
</group>
|
||||||
<group span="12" colunm="2">
|
<group span="12" colunm="2">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<list model="clinic.doctor">
|
<list model="clinic.doctor">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="name"/>
|
<field name="first_name"/>
|
||||||
|
<field name="last_name"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
</head>
|
</head>
|
||||||
<group span="12" colunm="2">
|
<group span="12" colunm="2">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="date"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group span="12" colunm="2">
|
<group span="12" colunm="2">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<list model="clinic.nurse">
|
<list model="clinic.nurse">
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="date"/>
|
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</list>
|
</list>
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Doctor(Model):
|
||||||
_multi_company=True
|
_multi_company=True
|
||||||
_fields={
|
_fields={
|
||||||
"number": fields.Char("Doctor No.",required=True,search=True),
|
"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),
|
"last_name" : fields.Char("Last name",required=False),
|
||||||
"date": fields.Date("Create Date",required=True,search=True),
|
"date": fields.Date("Create Date",required=True,search=True),
|
||||||
"card_id" : fields.Char("Identity ID"),
|
"card_id" : fields.Char("Identity ID"),
|
||||||
|
@ -23,11 +23,11 @@ class Doctor(Model):
|
||||||
#"licen" : fields.char("licens medicine No."),
|
#"licen" : fields.char("licens medicine No."),
|
||||||
"number2" : fields.Char("Certificate No."),
|
"number2" : fields.Char("Certificate No."),
|
||||||
"licen_issued" : fields.Date("Issued on"),
|
"licen_issued" : fields.Date("Issued on"),
|
||||||
"birthday": fields.Date("BirthDay",required=True,search=True),
|
"birthday": fields.Date("BirthDay",search=True),
|
||||||
"telephone": fields.Char("Telephone",required=True,search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department_id": fields.Many2One("clinic.department", "Department",required=True,search=True),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
"mobile": fields.Char("Mobile",required=True,search=True),
|
"mobile": fields.Char("Mobile",search=True),
|
||||||
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
|
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"),
|
||||||
"addresses" : fields.One2Many("address","related_id","Addresses"),
|
"addresses" : fields.One2Many("address","related_id","Addresses"),
|
||||||
"comments" : fields.One2Many("message","related_id","Comments"),
|
"comments" : fields.One2Many("message","related_id","Comments"),
|
||||||
"patients" : fields.Many2Many("clinic.patient","Patients"),
|
"patients" : fields.Many2Many("clinic.patient","Patients"),
|
||||||
|
@ -55,7 +55,12 @@ class Doctor(Model):
|
||||||
}
|
}
|
||||||
_order="date desc,number desc"
|
_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={}):
|
def void(self,ids,context={}):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
|
|
|
@ -15,20 +15,19 @@ class Nurse(Model):
|
||||||
"name": fields.Char("First name",required=True,search=True),
|
"name": fields.Char("First name",required=True,search=True),
|
||||||
#"last_name" : fields.char("Last name"),
|
#"last_name" : fields.char("Last name"),
|
||||||
"lname" : 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_id" : fields.Char("Identity ID"),
|
||||||
"card_expire" : fields.Date("Expire Date"),
|
"card_expire" : fields.Date("Expire Date"),
|
||||||
"birthday": fields.Date("Date of Birth",required=False,search=True),
|
"birthday": fields.Date("Date of Birth",search=True),
|
||||||
"telephone": fields.Char("Telephone",required=False,search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Department"),
|
"department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")],"Department"),
|
||||||
"mobile": fields.Char("Mobile",required=False,search=True),
|
"mobile": fields.Char("Mobile",required=False,search=True),
|
||||||
"number2" : fields.Char("Certificate No."),
|
"number2" : fields.Char("Certificate No."),
|
||||||
"licen_issued" : fields.Date("Issued on"),
|
"licen_issued" : fields.Date("Issued on"),
|
||||||
"birthday": fields.Date("BirthDay",required=True,search=True),
|
"birthday": fields.Date("BirthDay",search=True),
|
||||||
"telephone": fields.Char("Telephone",required=True,search=True),
|
"telephone": fields.Char("Telephone",search=True),
|
||||||
"department_id": fields.Many2One("clinic.department", "Department",required=True,search=True),
|
"department_id": fields.Many2One("clinic.department", "Department",search=True),
|
||||||
"mobile": fields.Char("Mobile",required=True,search=True),
|
"mobile": fields.Char("Mobile",search=True),
|
||||||
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
|
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status"),
|
||||||
"addresses": fields.One2Many("address","related_id","Addresses"),
|
"addresses": fields.One2Many("address","related_id","Addresses"),
|
||||||
"comments": fields.One2Many("message","related_id","Comments"),
|
"comments": fields.One2Many("message","related_id","Comments"),
|
||||||
"patients": fields.Many2Many("clinic.patient","Patients"),
|
"patients": fields.Many2Many("clinic.patient","Patients"),
|
||||||
|
|
Loading…
Reference in New Issue