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"),
|
2014-11-03 00:21:37 +00:00
|
|
|
'level_id': fields.Many2One("clinic.personal.level", "Level",),
|
2014-11-01 18:17:40 +00:00
|
|
|
'nurse_id': fields.Many2One("clinic.personal",'Nurse',domain=[['type','=','nurse']]),
|
|
|
|
}
|
|
|
|
|
|
|
|
_defaults={
|
|
|
|
"company_id": lambda *a: get_active_company(),
|
|
|
|
}
|
|
|
|
|
|
|
|
CycleItemNurse.register()
|