openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #25986
[Bug 1238035] [NEW] [7.0] Print survey response has no context
Public bug reported:
(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).
** Affects: openobject-addons
Importance: Undecided
Status: New
** Tags: context parser response survey timezone
--
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/1238035
Title:
[7.0] Print survey response has no context
Status in OpenERP Addons (modules):
New
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).
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1238035/+subscriptions
Follow ups
References