[IMP] survey :- improve code in survey_answer wizard.

bzr revid: ysa@tinyerp.co.in-20100419101904-cdi77hjccn7a0oll
This commit is contained in:
Ysa (Open ERP) 2010-04-19 15:49:04 +05:30
parent ad93fc9bd9
commit 620b446e3c
1 changed files with 9 additions and 8 deletions

View File

@ -588,14 +588,15 @@ class survey_question_wiz(osv.osv_memory):
self.pool.get(context.get('object',False)).survey_req_done(cr, uid, [int(context.get('cur_id'))], context)
else:
self.pool.get(context.get('object',False)).write(cr, uid, [int(context.get('cur_id',False))], {'response' : response_id})
for key,val in sur_name_read['store_ans'].items():
for field in vals:
if field.split('_')[0] == val['question_id']:
click_state = False
click_update.append(key)
break
if sur_name_read['store_ans'] and type(sur_name_read['store_ans']) == dict:
for key,val in sur_name_read['store_ans'].items():
for field in vals:
if field.split('_')[0] == val['question_id']:
click_state = False
click_update.append(key)
break
else:
sur_name_read['store_ans'] = {}
if click_state:
que_li = []
resp_id_list = []