clinic/netforce_clinic/models/vascular_access.py

17 lines
505 B
Python
Raw Permalink Normal View History

2014-12-02 07:08:20 +00:00
from netforce.model import Model, fields
class VascularAccess(Model):
_name="clinic.vascular.access"
_string="Vascular Access"
2015-04-03 04:45:16 +00:00
2014-12-02 07:08:20 +00:00
_fields={
"name": fields.Char("Name",required=True,search=True),
2015-04-03 04:45:16 +00:00
"code": fields.Char("Code",required=True,search=True),
"description": fields.Char("Description",search=True),
2014-12-02 07:08:20 +00:00
'note': fields.Text("Note"),
}
2015-04-03 04:45:16 +00:00
_sql_constraints=("clinic_vascular_key_uniq","unique(code)","code should be unique"),
2014-12-02 07:08:20 +00:00
VascularAccess.register()