clinic/netforce_clinic/models/cycle_item_nurse.py

19 lines
563 B
Python
Raw Normal View History

2014-11-01 18:17:40 +00:00
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']]),
2014-11-01 18:17:40 +00:00
}
_defaults={
"company_id": lambda *a: get_active_company(),
}
CycleItemNurse.register()