clinic/netforce_clinic/models/address.py

17 lines
411 B
Python
Raw Normal View History

2014-10-26 01:34:10 +00:00
from netforce.model import Model, fields
2014-11-29 14:56:15 +00:00
from pprint import pprint
2014-10-26 01:34:10 +00:00
class Address(Model):
_inherit="address"
_fields={
2015-03-02 04:03:07 +00:00
"patient_id": fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']]),
"staff_id": fields.Many2One("clinic.staff","Staff"),
2014-10-26 01:34:10 +00:00
}
2014-11-29 14:56:15 +00:00
def write(self,ids,vals,**kw):
pprint(vals)
super().write(ids,vals,**kw)
2014-10-26 01:34:10 +00:00
Address.register()