from netforce.model import Model, fields, get_model from netforce.access import get_active_company class CycleItemOther(Model): _name="clinic.cycle.item.other" _string="Cycle Item Other" _fields={ 'cycle_item_id': fields.Many2One("clinic.cycle.item", "Cycle Item",required=True), 'level_id': fields.Many2One("clinic.staff.level", "Level",), 'staff_id': fields.Many2One("clinic.staff",'Staff'), } _defaults={ "company_id": lambda *a: get_active_company(), } CycleItemOther.register()