2014-11-01 03:48:22 +00:00
|
|
|
from netforce.model import Model, fields
|
|
|
|
|
2015-01-14 04:31:24 +00:00
|
|
|
class HDCaseStaff(Model):
|
2014-11-25 11:39:53 +00:00
|
|
|
_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={
|
2015-01-14 04:31:24 +00:00
|
|
|
"hd_case_id": fields.Many2One("clinic.hd.case","HD Case",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
|
|
|
}
|
|
|
|
|
2015-01-14 04:31:24 +00:00
|
|
|
HDCaseStaff.register()
|
2014-11-01 03:48:22 +00:00
|
|
|
|