clinic/netforce_clinic/models/setting_account_patient.py

17 lines
572 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"),
}
_order="type_id,patient_id"
SettingAccountPatient.register()