From ef7eeeda2830868820ea80e828a08a42a5214ebd Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Tue, 18 Aug 2015 17:22:48 +0700 Subject: [PATCH] todo --- netforce_clinic/models/hd_case.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index de83494..2c50580 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -870,14 +870,17 @@ class HDCase(Model): for obj in self.browse(ids): is_decrease=context.get('is_decrease') for dlz_line in obj.dialyzers: + dlz=dlz_line.dialyzer_id membrane_type=dlz_line.membrane_type or 'unsub' dialyzer_type=dlz_line.dialyzer_type or 'low' use_time=dlz_line.use_time or 0 max_use_time=dlz_line.max_use_time or 0 desc=dlz_line.description or '' + #TODO when we to draft after approve hdcase it will update the wrong use time + #if use_time > (dlz.use_time or 0): + #continue if is_decrease: use_time-=1 - print("decrease ok") vals={ 'membrane_type': membrane_type, 'dialyzer_type': dialyzer_type, @@ -892,9 +895,6 @@ class HDCase(Model): }) elif use_time > max_use_time: raise Exception("Dialyzer is expired!") - else: - pass - dlz=dlz_line.dialyzer_id dlz.write(vals) return True