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