openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #11230
[Bug 996565] Re: Survey doesn't generate the right report
Hello Ravish, thanks for replying.
I'm on version 6.1-20120406-233633 and the addons are I've just
installed the HR addons, particularly hr_recruitment (v1.0) and survey
(v1.0).
This happens when I reply more then 10 times to an HR survey, with the
option to send email notification, which generates PDFs that get
attached to an applicant's profile. After the tenth reply or so, the PDF
have information about previous surveys, instead of the latest, because
the survey 'id' get truncated in the code above (I've debugged it).
--
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):
Incomplete
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