Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
efda0ab2
Commit
efda0ab2
authored
Mar 19, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deferred_style: call report method with user language
Some report sections may be using translation.
parent
9debeb6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_computeReportSection.py
...ins/erp5_deferred_style_core/Base_computeReportSection.py
+10
-9
No files found.
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_computeReportSection.py
View file @
efda0ab2
...
@@ -5,15 +5,16 @@ form = context.restrictedTraverse(form)
...
@@ -5,15 +5,16 @@ form = context.restrictedTraverse(form)
request
=
container
.
REQUEST
request
=
container
.
REQUEST
request
.
other
.
update
(
request_other
)
request
.
other
.
update
(
request_other
)
if
form
.
meta_type
==
'ERP5 Report'
:
with
portal
.
Localizer
.
translationContext
(
localizer_language
):
report_section_list
=
getattr
(
context
,
form
.
report_method
)()
if
form
.
meta_type
==
'ERP5 Report'
:
elif
form
.
meta_type
==
'ERP5 Form'
:
report_section_list
=
getattr
(
context
,
form
.
report_method
)()
report_section_list
=
[]
elif
form
.
meta_type
==
'ERP5 Form'
:
for
field
in
form
.
get_fields
():
report_section_list
=
[]
if
field
.
getRecursiveTemplateField
().
meta_type
==
'ReportBox'
:
for
field
in
form
.
get_fields
():
report_section_list
.
extend
(
field
.
render
())
if
field
.
getRecursiveTemplateField
().
meta_type
==
'ReportBox'
:
else
:
report_section_list
.
extend
(
field
.
render
())
raise
ValueError
,
'form meta_type (%r) unknown'
%
(
form
.
meta_type
,)
else
:
raise
ValueError
,
'form meta_type (%r) unknown'
%
(
form
.
meta_type
,)
# Rebuild request_other as report section can have modify request content
# Rebuild request_other as report section can have modify request content
request_other
=
portal
.
ERP5Site_filterRequestForDeferredStyle
(
request
)
request_other
=
portal
.
ERP5Site_filterRequestForDeferredStyle
(
request
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment