clinic/netforce_clinic/models/cycle_item_doctor.py

19 lines
575 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 CycleItemDoctor(Model):
_name="clinic.cycle.item.doctor"
_string="Cycle Item Doctor"
_fields={
'cycle_item_id': fields.Many2One("clinic.cycle.item", "Cycle Item"),
'categ_id': fields.Many2One("clinic.personal.categ", "Category",),
'doctor_id': fields.Many2One("clinic.personal",'Doctor',domain=[['type','=','doctor']]),
}
_defaults={
"company_id": lambda *a: get_active_company(),
}
CycleItemDoctor.register()