clinic/netforce_clinic/models/setting_account_patient.py

19 lines
656 B
Python
Raw Normal View History

2015-03-04 07:42:18 +00:00
from netforce.model import Model, fields
class SettingAccountPatient(Model):
_name="clinic.setting.account.patient"
_string="Setting Account Patient"
_fields={
"setting_id": fields.Many2One("clinic.setting","Setting",required=True,on_delete="cascade"),
"patient_id": fields.Many2One("clinic.patient","Patient",domain=[["state","=","admit"]]),
'partner_id': fields.Many2One("partner","Contact"),
'type_id': fields.Many2One("clinic.patient.type","Type"),
'hn': fields.Char("HN"),
'card_no': fields.Char("ID Card",size=13),
2015-03-04 07:42:18 +00:00
}
_order="type_id,patient_id"
SettingAccountPatient.register()