19 lines
563 B
Python
19 lines
563 B
Python
from netforce.model import Model, fields, get_model
|
|
from netforce.access import get_active_company
|
|
|
|
class CycleItemNurse(Model):
|
|
_name="clinic.cycle.item.nurse"
|
|
_string="Cycle Item Nurse"
|
|
|
|
_fields={
|
|
'cycle_item_id': fields.Many2One("clinic.cycle.item", "Cycle Item"),
|
|
'level_id': fields.Many2One("clinic.staff.level", "Level",),
|
|
'nurse_id': fields.Many2One("clinic.staff",'Nurse',domain=[['type','=','nurse']]),
|
|
}
|
|
|
|
_defaults={
|
|
"company_id": lambda *a: get_active_company(),
|
|
}
|
|
|
|
CycleItemNurse.register()
|