diff --git a/netforce_clinic/layouts/clinic_address_form.xml b/netforce_clinic/layouts/clinic_address_form.xml new file mode 100644 index 0000000..09a21cc --- /dev/null +++ b/netforce_clinic/layouts/clinic_address_form.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/netforce_clinic/layouts/clinic_branch_form.xml b/netforce_clinic/layouts/clinic_branch_form.xml index 279bba4..13f8088 100644 --- a/netforce_clinic/layouts/clinic_branch_form.xml +++ b/netforce_clinic/layouts/clinic_branch_form.xml @@ -9,6 +9,8 @@ + + diff --git a/netforce_clinic/layouts/clinic_sequence_form.xml b/netforce_clinic/layouts/clinic_sequence_form.xml new file mode 100644 index 0000000..69cc5e9 --- /dev/null +++ b/netforce_clinic/layouts/clinic_sequence_form.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index 819bdc6..77bd07f 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -121,3 +121,5 @@ from . import select_company from . import name_title from . import compute_labor_cost from . import login +from . import address +from . import sequence diff --git a/netforce_clinic/models/address.py b/netforce_clinic/models/address.py index 1d3b3da..df8c8a1 100644 --- a/netforce_clinic/models/address.py +++ b/netforce_clinic/models/address.py @@ -1,16 +1,9 @@ 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"), + 'fax': fields.Char("Fax"), } - - def write(self,ids,vals,**kw): - pprint(vals) - super().write(ids,vals,**kw) Address.register() diff --git a/netforce_clinic/models/branch.py b/netforce_clinic/models/branch.py index b5a402b..c393c45 100644 --- a/netforce_clinic/models/branch.py +++ b/netforce_clinic/models/branch.py @@ -12,6 +12,7 @@ class Branch(Model): "company_id": fields.Many2One("company","Company"), 'departments': fields.One2Many("clinic.department","branch_id","Departments"), 'active': fields.Boolean("Active"), + "addresses": fields.One2Many("address","related_id","Addresses"), } _defaults={ diff --git a/netforce_clinic/models/sequence.py b/netforce_clinic/models/sequence.py new file mode 100644 index 0000000..8aedbec --- /dev/null +++ b/netforce_clinic/models/sequence.py @@ -0,0 +1,10 @@ +from netforce.model import Model, fields + +class Sequence(Model): + _inherit="sequence" + _fields={ + 'fax': fields.Char("Fax"), + 'branch_id': fields.Many2One("clinic.branch","Branch"), + } + +Sequence.register()