17 lines
572 B
Python
17 lines
572 B
Python
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()
|