diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 8dc501b..1875e05 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -60,7 +60,7 @@ -
+
diff --git a/netforce_clinic/models/hd_case_expense.py b/netforce_clinic/models/hd_case_expense.py index 6fd831f..e457a1d 100644 --- a/netforce_clinic/models/hd_case_expense.py +++ b/netforce_clinic/models/hd_case_expense.py @@ -1,11 +1,13 @@ import time from netforce.model import Model, fields +from netforce.access import get_active_company class HDCaseExpense(Model): _name="clinic.hd.case.expense" _string="Expense" _name_field="date" + _multi_company=True def _get_patient_conflict(self,ids,context={}): res={} @@ -28,11 +30,13 @@ class HDCaseExpense(Model): 'state': fields.Selection([['draft','Draft'],['waiting_matching','Waiting Matching'],['match','Match'],['unmatch','Unmatch'],['approved','Approved']],'State'), 'note': fields.Text("Note"), 'pt_conflict': fields.Boolean("Patient Conclict",function="_get_patient_conflict"), + 'company_id': fields.Many2One("company","Company"), } _defaults={ 'state': 'draft', 'date': time.strftime("%Y-%m-%d"), + "company_id": lambda *a: get_active_company(), } _order="date desc" diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py index 9a68ed3..532f163 100644 --- a/netforce_clinic/models/visit.py +++ b/netforce_clinic/models/visit.py @@ -280,8 +280,10 @@ class Visit(Model): 'doctor_id': doctor.id, }) else: - data['doctor_id']=None - data['department_id']=None + doctor=patient.doctor_id + department=patient.department_id + data['doctor_id']=doctor.id + data['department_id']=department.id return data diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 66b138b..1557a7b 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -1,3 +1,9 @@ +-- tonight - +- matching +- report expense +-- cost nurse / doctor + + - missing - import schedule -> wait K. Ekk - missing hd case in staff (nurse, doctor)