20 lines
651 B
Python
20 lines
651 B
Python
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()
|
|
|