clinic/netforce_clinic/models/clinic_department.py

15 lines
371 B
Python

from netforce.model import Model, fields
class Department(Model):
_name="clinic.department"
_string="Department"
#_name_field="name"
_fields={
"name": fields.Char("Name",required=True,search=True),
"code": fields.Char("Code",search=True),
"parent_id": fields.Many2One("clinic.department", "Parent"),
}
Department.register()