From 22f8dbda52ad8e525d293c8dfb77bcdc6c8cb236 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Mon, 4 May 2015 10:00:31 +0700 Subject: [PATCH] auto fill up require field from previos data --- netforce_clinic/models/hd_case_popup_dlz.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netforce_clinic/models/hd_case_popup_dlz.py b/netforce_clinic/models/hd_case_popup_dlz.py index c4d6a90..35afccc 100644 --- a/netforce_clinic/models/hd_case_popup_dlz.py +++ b/netforce_clinic/models/hd_case_popup_dlz.py @@ -42,10 +42,14 @@ class HDCasePopupDlz(Model): data=context['data'] product_id=data['product_id'] data['membrane_type']=None + data['dialyzer_type']=None + #data['max_use_time']=None for dlz in get_model("clinic.dialyzer").search_browse([]): prod=dlz.product_id if prod.id==product_id: data['membrane_type']=dlz.membrane_type + data['dialyzer_type']=dlz.dialyzer_type or "low" + data['max_use_time']=dlz.max_use_time or 0 break return data