clinic/netforce_clinic/models/personal_level.py

26 lines
716 B
Python
Raw Normal View History

2014-11-02 01:26:42 +00:00
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([("doctor","Doctor"),("nurse","Nurse")],"Personal Type",required=True),
}
_defaults={
"company_id": lambda *a: get_active_company(),
'sequence': 0,
'type': 'nurse',
'formular': '',
}
_order="sequence"
PersonalLevel.register()