auto fill up require field from previos data

conv_bal
watcha.h@almacom.co.th 2015-05-04 10:00:31 +07:00
parent 2cc4aff3a2
commit 22f8dbda52
1 changed files with 4 additions and 0 deletions

View File

@ -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