20 lines
635 B
Python
20 lines
635 B
Python
from netforce.model import Model, fields
|
|
|
|
class HdCaseStaff(Model):
|
|
_name="clinic.hd.case.staff"
|
|
_fields={
|
|
"hd_case_id": fields.Many2One("clinic.hd.case","HdCase",required=True,on_delete="cascade"),
|
|
"staff_id": fields.Many2One("clinic.staff","Staff",search=True),
|
|
"type": fields.Selection([("doctor","Doctor"),('nurse','Nurse'),("staff","Staff")],"Type",required=True),
|
|
"priop": fields.Selection([("owner","Owner"),('second','Second')],"Priority"),
|
|
'note': fields.Char("Note"),
|
|
}
|
|
|
|
_defaults={
|
|
'type': 'nurse',
|
|
'priop': 'other',
|
|
}
|
|
|
|
HdCaseStaff.register()
|
|
|