← Back to team overview

openerp-india team mailing list archive

[Bug 996565] Re: Survey doesn't generate the right report

 

** Changed in: openobject-addons
       Status: Incomplete => Confirmed

** Changed in: openobject-addons
   Importance: Undecided => Low

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP Publisher's Warranty Team (openerp-opw)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/996565

Title:
  Survey doesn't generate the right report

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  When generating a PDF from an applicant survey, the addon fetches the
  wrong information from the database.

  The problem seems to be that the class 'survey_browse_response'
  expects a list in context['response_id']:

    elif context.has_key('response_id') and context['response_id']:
    response_id = [int(context['response_id'][0])]

  but 'survey_question_wiz.fields_view_get', where that key/value is
  initialized, sets a string with integer:

    response_id = surv_name_wiz.read(cr, uid, context.get('sur_name_id',False))['response']
    context.update({'response_id':response_id})

  Then what happens is that the string gets treated as a list, so only
  the first digit is read. Changing the last line to

    context.update({'response_id': [response_id] })

  fixes it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/996565/+subscriptions


References