2014-11-01 03:48:22 +00:00
|
|
|
from netforce.model import Model, fields
|
|
|
|
|
2014-11-25 11:39:53 +00:00
|
|
|
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-11-25 11:39:53 +00:00
|
|
|
"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),
|
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={
|
|
|
|
'type': 'nurse',
|
|
|
|
'priop': 'other',
|
|
|
|
}
|
|
|
|
|
2014-11-25 11:39:53 +00:00
|
|
|
HdCaseStaff.register()
|
2014-11-01 03:48:22 +00:00
|
|
|
|