Commit 731a8116 authored by Jérome Perrin's avatar Jérome Perrin

deferred_style: save Localizer selected language earlier

Localizer.get_selected_language is only functional in response to user
requests. Saving it in Base_computeReportSection was already too late
because it's already an activity request.
parent 0b8b8cb5
......@@ -25,6 +25,7 @@ skin_name = request['deferred_portal_skin']
# request).
request_other = portal.ERP5Site_filterRequestForDeferredStyle(request)
localizer_language = portal.Localizer.get_selected_language()
context.activate(activity="SQLQueue", tag=tag, after_tag=after_tag,
priority=priority).Base_computeReportSection(
......@@ -34,7 +35,8 @@ context.activate(activity="SQLQueue", tag=tag, after_tag=after_tag,
tag=tag,
skin_name=skin_name,
format=format,
priority=priority,
priority=priority,
localizer_language=localizer_language,
**kw)
context.activate(activity='SQLQueue', after_tag=tag).getTitle()
......
......@@ -18,7 +18,6 @@ else:
# Rebuild request_other as report section can have modify request content
request_other = portal.ERP5Site_filterRequestForDeferredStyle(request)
localizer_language = portal.Localizer.get_selected_language()
active_process = portal.portal_activities.newActiveProcess()
for idx, report_section in enumerate(report_section_list):
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form, request_other, user_name, tag, skin_name, format, priority, **kw</string> </value>
<value> <string>form, request_other, user_name, tag, skin_name, format, priority, localizer_language, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment