from netforce.model import Model, fields from netforce.access import get_active_company class PersonalLevel(Model): _name="clinic.personal.level" _string="Personal Level" _fields={ "name": fields.Char("Name",required=True,search=True), 'formular': fields.Text("Formular"), 'description': fields.Text("Description"), 'sequence': fields.Integer("Sequence"), "type": fields.Selection([('personal','Personal'),("doctor","Doctor"),("nurse","Nurse")],"Personal Type",required=True), } _defaults={ "company_id": lambda *a: get_active_company(), 'sequence': 0, 'type': 'personal', 'formular': '', } _order="sequence" PersonalLevel.register()