From d1e01e048aa3f6bf20e576f12dd83882a2cba3de Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Sun, 2 Nov 2014 10:38:17 +0700 Subject: [PATCH] refactor --- netforce_clinic/layouts/clinic_personal_form.xml | 6 ++++-- netforce_clinic/models/personal.py | 6 ++++-- netforce_clinic/todo.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/netforce_clinic/layouts/clinic_personal_form.xml b/netforce_clinic/layouts/clinic_personal_form.xml index 6c788fe..d683a82 100644 --- a/netforce_clinic/layouts/clinic_personal_form.xml +++ b/netforce_clinic/layouts/clinic_personal_form.xml @@ -33,15 +33,17 @@ + - + + + - diff --git a/netforce_clinic/models/personal.py b/netforce_clinic/models/personal.py index d3a54ad..f97857e 100644 --- a/netforce_clinic/models/personal.py +++ b/netforce_clinic/models/personal.py @@ -36,10 +36,11 @@ class Personal(Model): "prof_license_date" : fields.Date("License Date"), "birthday": fields.Date("BirthDay",search=True), "department_id": fields.Many2One("clinic.department", "Department",search=True), - "patients": fields.Many2Many("clinic.patient","Patients"), + "patients": fields.One2Many("clinic.patient","doctor_id","Patients"), "addresses": fields.One2Many("address","personal_id","Addresses"), "comments": fields.One2Many("message","related_id","Comments"), - "visits": fields.One2Many("clinic.visit","nurse_id","Visits"), + "nurse_visits": fields.One2Many("clinic.visit","nurse_id","Visits"), + "doctor_visits": fields.One2Many("clinic.visit","doctor_id","Visits"), "hd_cases": fields.One2Many("clinic.hd.case","nurse_id","HD Cases"), "company_id": fields.Many2One("company","Company"), "user_id": fields.Many2One("base.user","User"), @@ -49,6 +50,7 @@ class Personal(Model): 'level_id': fields.Many2One("clinic.personal.level", "Level"), 'active': fields.Boolean("Active"), 'date': fields.Date("Register Date"), + 'base': fields.Float("Base Amount"), } def _get_number(self,context={}): diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index cad01b7..173f581 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -3,6 +3,7 @@ missing: - color calendar - can not move calendar's schedule - order's visit report dialy + - same model & mode (list) but use diffent target dashboard : hd summary report -> click and go direct cycle item: