clinic/netforce_clinic/models/cycle_item_nurse.py

19 lines
572 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"),
'categ_id': fields.Many2One("clinic.personal.categ", "Category",),
'nurse_id': fields.Many2One("clinic.personal",'Nurse',domain=[['type','=','nurse']]),
}
_defaults={
"company_id": lambda *a: get_active_company(),
}
CycleItemNurse.register()