[trunk/7.0] Print survey response has no context

Bug #1238035 reported by Jordi Llinares - KM Sistemas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP R&D Addons Team 1

Bug Description

(Also affects to 6.1)

In survey module, survey_browse_response class fails to pass the context to the parser. Code reads

rml_obj = report_sxw.rml_parse(cr, uid, surv_resp_obj._name, context)

rml_parse is initialized with two optional arguments before the context: 'parents' and 'tag'. A not explicit enough call to rml_parse leads 'parents' to receive the context. It should read

rml_obj = report_sxw.rml_parse(cr, uid, surv_resp_obj._name, context=context)

In the practice, if you try to modify the survey response report adding a datetime field, it'll always be shown in UTC, because context_timestamp method receives an empty dict.

Sorry not formatting the code or using a more standarized way to propose the patch. I don't use bzr+ launchpad (I absolutely prefer git +bitbucket).

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: New → Confirmed
Amit Parik (amit-parik)
summary: - [7.0] Print survey response has no context
+ [trunk/7.0] Print survey response has no context
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.