diff --git a/netforce_clinic/actions/clinic_visit.xml b/netforce_clinic/actions/clinic_visit.xml
index deb87d7..6bd2ebc 100644
--- a/netforce_clinic/actions/clinic_visit.xml
+++ b/netforce_clinic/actions/clinic_visit.xml
@@ -3,7 +3,7 @@
multi_view
clinic.visit
[["All",[]],["Draft",[["state","=","draft"]]],["Pending",[["state","=","pending"]]],["Confirmed",[["state","=","confirmed"]]],["Cancelled",[["state","=","cancelled"]]]]
- list,form,calendar
+ list,form
clinic_menu
25
diff --git a/netforce_clinic/layouts/clinic_dialyzer_list.xml b/netforce_clinic/layouts/clinic_dialyzer_list.xml
index b58d647..e948238 100644
--- a/netforce_clinic/layouts/clinic_dialyzer_list.xml
+++ b/netforce_clinic/layouts/clinic_dialyzer_list.xml
@@ -1,4 +1,5 @@
+
diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml
index 5e5c04f..e289f1a 100644
--- a/netforce_clinic/layouts/clinic_menu.xml
+++ b/netforce_clinic/layouts/clinic_menu.xml
@@ -14,7 +14,7 @@
-
-
+
diff --git a/netforce_clinic/layouts/clinic_visit_list.xml b/netforce_clinic/layouts/clinic_visit_list.xml
index a54636e..a10b8f5 100644
--- a/netforce_clinic/layouts/clinic_visit_list.xml
+++ b/netforce_clinic/layouts/clinic_visit_list.xml
@@ -1,4 +1,7 @@
+
+
+
diff --git a/netforce_clinic/models/hd_case_popup_dlz.py b/netforce_clinic/models/hd_case_popup_dlz.py
index 71cef07..0af5ca0 100644
--- a/netforce_clinic/models/hd_case_popup_dlz.py
+++ b/netforce_clinic/models/hd_case_popup_dlz.py
@@ -20,7 +20,7 @@ class HDCasePopupDlz(Model):
if not hd_case_id:
return None
return int(hd_case_id)
-
+
_defaults={
'hd_case_id': _get_hd_case_id,
'dialyzer_type': 'low',
@@ -35,4 +35,8 @@ class HDCasePopupDlz(Model):
context['pop_id']=obj.id
return hd_case.new_dialyzer(context=context)
+ def onchnage_product(self,context={}):
+ data=context['data']
+ return data
+
HDCasePopupDlz.register()
diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py
index 23ed9da..fbd66d5 100644
--- a/netforce_clinic/models/patient.py
+++ b/netforce_clinic/models/patient.py
@@ -43,7 +43,10 @@ class Patient(Model):
# remove all space for make sure
res={}
for obj in self.browse(ids):
- res[obj.id]=(obj.name or "").replace(" ","")
+ name=(obj.name or "").replace(" ","")
+ if not obj.active:
+ name+='not_use'
+ res[obj.id]=name
return res
_fields={
diff --git a/netforce_clinic/models/visit.py b/netforce_clinic/models/visit.py
index 9e080eb..58becc6 100644
--- a/netforce_clinic/models/visit.py
+++ b/netforce_clinic/models/visit.py
@@ -430,16 +430,16 @@ class Visit(Model):
return data
def to_draft(self,ids,context={}):
- obj=self.browse(ids)[0]
- for hd_case in obj.hd_cases:
- hd_case.to_draft()
- for line in hd_case.lines:
- line.delete()
- for ps in hd_case.staffs:
- ps.delete()
- obj.write({
- 'state': 'draft',
- })
+ for obj in self.browse(ids):
+ for hd_case in obj.hd_cases:
+ hd_case.to_draft()
+ for line in hd_case.lines:
+ line.delete()
+ for ps in hd_case.staffs:
+ ps.delete()
+ obj.write({
+ 'state': 'draft',
+ })
def gen_no(self,ids,context={}):
obj=self.browse(ids)[0]
diff --git a/netforce_clinic/models/visit_board.py b/netforce_clinic/models/visit_board.py
index 0adf326..527dd4d 100644
--- a/netforce_clinic/models/visit_board.py
+++ b/netforce_clinic/models/visit_board.py
@@ -182,6 +182,9 @@ class VisitBoard(Model):
number='*Waiting'
cycle=visit.cycle_id
patient=visit.patient_id
+ if not patient.active:
+ print('skip not active ', patient.name)
+ continue
branch=visit.branch_id
department=visit.department_id
if not branch: