Complete Customize Add fields Doctor

conv_bal
chayut.s 2014-10-01 14:50:42 +07:00
parent 65739b0a3d
commit 2ee03fbb9c
2 changed files with 41 additions and 26 deletions

View File

@ -5,18 +5,27 @@
<item string="Send Confirm visit"/>
</button>
</head>
<tabs>
<tab string="Doctor general">
<separator string="Doctor Info"/>
<separator string="Doctor Information"/>
<group span="12" colunm="2">
<field name="number"/>
<field name="name"/>
<field name="date"/>
<field name="birthday"/>
</group>
<group span="12" colunm="2">
<field name="name"/>
<field name="last_name"/>
</group>
<group span="12" colunm="2">
<field name="card_id"/>
<field name="card_expire"/>
</group>
<field name="number2"/>
<field name="licen_issued"/>
<field name="birthday" span="12"/>
<group span="12" colunm="2">
<field name="telephone"/>
<field name="mobile"/>
</group>
<field name="department"/>
</tab>
</tabs>
<related>
<field name="addresses"/>
</related>

View File

@ -11,13 +11,19 @@ class Doctor(Model):
_name_field="name"
_multi_company=True
_fields={
"number": fields.Char("Number",required=True,search=True),
"name": fields.Char("Name",required=True,search=True),
"number": fields.Char("Doctor No.",required=True,search=True),
"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),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
"department": fields.Char("Department",required=True,search=True),
"mobile": fields.Char("Mobile",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),
"department": fields.Selection([("temporary","Temporary"),("permanent","Permanent")], "Dapartment"),
"mobile": fields.Char("Mobile",required=False,search=True),
#"licen" : fields.char("licens medicine No."),
"number2" : fields.Char("Licen medical No."),
"licen_issued" : fields.Date("Issued on"),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses" : fields.One2Many("address","related_id","Addresses"),
"comments" : fields.One2Many("message","related_id","Comments"),