clinic/netforce_clinic/models/hd_case_staff.py

21 lines
686 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-12-04 15:26:20 +00:00
_name_field="staff_id"
2014-11-01 03:48:22 +00:00
_fields={
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"),
2014-12-20 18:55:26 +00:00
"staff_id": fields.Many2One("clinic.staff","Doctor",search=True),
2014-11-25 16:31:29 +00:00
"type": fields.Selection([("doctor","Doctor"),('nurse','Nurse'),("staff","Staff")],"Type",required=True),
2014-12-09 07:29:30 +00:00
"priop": fields.Selection([("owner","Owner"),('second','Secondary'),('other','Other')],"Priority"),
2014-11-01 03:48:22 +00:00
'note': fields.Char("Note"),
}
_defaults={
2014-12-20 18:55:26 +00:00
'type': 'doctor',
'priop': 'second',
2014-11-01 03:48:22 +00:00
}
HdCaseStaff.register()
2014-11-01 03:48:22 +00:00