clinic/netforce_clinic/models/hd_case_staff.py

20 lines
635 B
Python
Raw Normal View History

2014-11-01 03:48:22 +00:00
from netforce.model import Model, fields
class HdCaseStaff(Model):
_name="clinic.hd.case.staff"
2014-11-01 03:48:22 +00:00
_fields={
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"),
"staff_id": fields.Many2One("clinic.staff","Staff",search=True),
2014-11-25 16:31:29 +00:00
"type": fields.Selection([("doctor","Doctor"),('nurse','Nurse'),("staff","Staff")],"Type",required=True),
"priop": fields.Selection([("owner","Owner"),('second','Second')],"Priority"),
2014-11-01 03:48:22 +00:00
'note': fields.Char("Note"),
}
_defaults={
'type': 'nurse',
'priop': 'other',
}
HdCaseStaff.register()
2014-11-01 03:48:22 +00:00