From 386174cf0eee7a378c3dc0ccfa557a858ae7f300 Mon Sep 17 00:00:00 2001
From: Dharti Ratani <dhr@openerp.com>
Date: Thu, 11 Sep 2014 17:01:03 +0200
Subject: [PATCH] [FIX] survey: access rights error when editing

The wizard 'Edit Survey' > 'Add Question' was trowing an access rights error as the id was passed as a string instead of a real id. opw 607854
---
 addons/survey/wizard/survey_answer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index c87a87c3e77c..fad82663469e 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -157,7 +157,7 @@ class survey_question_wiz(osv.osv_memory):
                         title = sur_rec.title
                     xml_form = etree.Element('form', {'string': tools.ustr(title)})
                     if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
-                        context.update({'page_id' : tools.ustr(p_id),'page_number' : sur_name_rec.page_no , 'transfer' : sur_name_read.transfer})
+                        context.update({'page_id' : p_id,'page_number' : sur_name_rec.page_no , 'transfer' : sur_name_read.transfer})
                         xml_group3 = etree.SubElement(xml_form, 'group', {'col': '4', 'colspan': '4'})
                         etree.SubElement(xml_group3, 'button', {'string' :'Add Page','icon': "gtk-new", 'type' :'object','name':"action_new_page", 'context' : tools.ustr(context)})
                         etree.SubElement(xml_group3, 'button', {'string' :'Edit Page','icon': "gtk-edit", 'type' :'object','name':"action_edit_page", 'context' : tools.ustr(context)})
-- 
GitLab