diff --git a/netforce_clinic/layouts/clinic_dialyzer_form.xml b/netforce_clinic/layouts/clinic_dialyzer_form.xml
index 45894c5..62ef27d 100644
--- a/netforce_clinic/layouts/clinic_dialyzer_form.xml
+++ b/netforce_clinic/layouts/clinic_dialyzer_form.xml
@@ -3,6 +3,7 @@
@@ -12,7 +13,7 @@
-
+
@@ -31,9 +32,8 @@
-
+
-
diff --git a/netforce_clinic/models/dialyzer.py b/netforce_clinic/models/dialyzer.py
index f1103b6..a02a7b4 100644
--- a/netforce_clinic/models/dialyzer.py
+++ b/netforce_clinic/models/dialyzer.py
@@ -95,7 +95,7 @@ class Dialyzer(Model):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
- def confirm(self,ids,context={}):
+ def validate(self,ids,context={}):
id=ids[0]
obj=self.browse(id)
patient=obj.patient_id
@@ -211,11 +211,10 @@ class Dialyzer(Model):
'flash': 'Dializer %s is cancelled'%(obj.number),
}
- def renew(self,ids,context={}):
+ def to_draft(self,ids,context={}):
obj=self.browse(ids[0])
- # XXX
- if obj.use_time > obj.max_use_time:
- raise Exception("Dialyzer %s is expired. (use time > max use time)"%obj.number or '')
+ #if obj.use_time > obj.max_use_time:
+ #raise Exception("Dialyzer %s is expired. (use time > max use time)"%obj.number or '')
obj.cancel()
obj.write({"state": "new"})
diff --git a/netforce_clinic/models/setting.py b/netforce_clinic/models/setting.py
index 0af8077..01a8ad8 100644
--- a/netforce_clinic/models/setting.py
+++ b/netforce_clinic/models/setting.py
@@ -108,9 +108,10 @@ class ClinicSetting(Model):
if user_id !=1:
print("Only admin!!")
return
- for pt in get_model("clinic.patient").search_browse([]):
- pt.write({
- 'hn_no': pt.number or "",
+ for hdi in get_model("clinic.hd.case.dialyzer").search_browse([]):
+ dlz=hdi.dialyzer_id
+ hdi.write({
+ 'membrane_type': dlz.membrane_type,
})
print("Done! ")