clinic/netforce_clinic/models/hd_case_personal.py

20 lines
651 B
Python
Raw Normal View History

2014-11-01 03:48:22 +00:00
from netforce.model import Model, fields
class HdCasePersonal(Model):
_name="clinic.hd.case.personal"
_fields={
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"),
"personal_id": fields.Many2One("clinic.personal","Personal",search=True),
"type": fields.Selection([("doctor","Doctor"),('nurse','Nurse'),("other","Other")],"Type",required=True),
"priop": fields.Selection([("owner","Owner"),('other','Other')],"Priority"),
'note': fields.Char("Note"),
}
_defaults={
'type': 'nurse',
'priop': 'other',
}
HdCasePersonal.register()