[FIX] survey: data_get code now returns the good type for sequence

bzr revid: qdp-launchpad@openerp.com-20110919120922-nv7rszc8pf182msh
This commit is contained in:
Quentin (OpenERP) 2011-09-19 14:09:22 +02:00
parent 084f176af9
commit 2cd695b35d
1 changed files with 3 additions and 3 deletions

View File

@ -504,12 +504,12 @@ class survey_question(osv.osv):
def data_get(self, cr, uid, data, context):
if data and context:
if context.get('line_order',False) and data.get('sequence',0):
if context.get('line_order', False):
lines = context.get('line_order')
seq = data['sequence']
seq = data.get('sequence', 0)
for line in lines:
seq = seq + 1
data.update({'sequence': str(seq)})
data.update({'sequence': seq})
return data
def default_get(self, cr, uid, fields, context=None):