clinic/netforce_clinic/models/address.py

17 lines
411 B
Python

from netforce.model import Model, fields
from pprint import pprint
class Address(Model):
_inherit="address"
_fields={
"patient_id": fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']]),
"staff_id": fields.Many2One("clinic.staff","Staff"),
}
def write(self,ids,vals,**kw):
pprint(vals)
super().write(ids,vals,**kw)
Address.register()