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
Léo-Paul Géneau
erp5
Commits
773c2da9
Commit
773c2da9
authored
May 17, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Form.ListBox: Stop using *_expression catalog arguments.
parent
81cda1b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+11
-11
No files found.
product/ERP5Form/ListBox.py
View file @
773c2da9
...
...
@@ -1368,11 +1368,11 @@ class ListBoxRenderer:
return
DomainSelection
(
domain_dict
=
root_dict
).
__of__
(
self
.
getContext
())
@
lazyMethod
def
getStatSelect
Expression
(
self
):
"""Return a
string
which expresses the information retrieved by SELECT for
def
getStatSelect
Dict
(
self
):
"""Return a
dict
which expresses the information retrieved by SELECT for
the statistics.
"""
select_
expression_list
=
[]
select_
dict
=
{}
if
self
.
showStat
():
stats
=
self
.
getSelectionTool
().
getSelectionStats
(
self
.
getSelectionName
(),
REQUEST
=
self
.
request
)
stat_column_list
=
self
.
getStatColumnList
()
...
...
@@ -1387,13 +1387,13 @@ class ListBoxRenderer:
if
(
column
is
not
None
)
and
(
column
[
0
]
==
column
[
1
]):
try
:
if
stats
[
index
]
!=
' '
:
select_
expression_list
.
append
(
'%s(%s) AS %s'
%
(
stats
[
index
],
sql
,
alias
)
)
select_
dict
[
alias
]
=
'%s(%s)'
%
(
stats
[
index
],
sql
)
else
:
select_
expression_list
.
append
(
"'' AS %s"
%
alias
)
select_
dict
[
alias
]
=
"''"
except
IndexError
:
select_
expression_list
.
append
(
"'' AS %s"
%
alias
)
select_
dict
[
alias
]
=
"''"
return
', '
.
join
(
select_expression_list
)
return
select_dict
def
makeReportTreeList
(
self
,
root_dict
=
None
,
report_path
=
None
,
base_category
=
None
,
depth
=
0
,
unfolded_list
=
(),
is_report_opened
=
True
,
sort_on
=
((
'id'
,
'ASC'
),),
...
...
@@ -1619,7 +1619,7 @@ class ListBoxRenderer:
# First, get the statitics by the global stat method.
param_dict
=
self
.
getParamDict
()
new_param_dict
=
param_dict
.
copy
()
new_param_dict
[
'select_
expression'
]
=
self
.
getStatSelectExpression
()
new_param_dict
[
'select_
dict'
]
=
self
.
getStatSelectDict
()
selection
=
self
.
getSelection
()
selection
.
edit
(
params
=
new_param_dict
)
...
...
@@ -1703,7 +1703,7 @@ class ListBoxRenderer:
selection
=
self
.
getSelection
()
selection_tool
=
self
.
getSelectionTool
()
report_list
=
selection
.
getReportList
()
stat_select_
expression
=
self
.
getStatSelectExpression
()
stat_select_
dict
=
self
.
getStatSelectDict
()
stat_method
=
self
.
getStatMethod
()
count_method
=
self
.
getCountMethod
()
list_method
=
self
.
getListMethod
()
...
...
@@ -1769,9 +1769,9 @@ class ListBoxRenderer:
stat_method
)
if
report_tree
.
is_pure_summary
and
self
.
showStat
():
# Push a new select_
expression
.
# Push a new select_
dict
.
new_param_dict
=
param_dict
.
copy
()
new_param_dict
[
'select_
expression'
]
=
stat_select_expression
new_param_dict
[
'select_
dict'
]
=
stat_select_dict
selection
.
edit
(
params
=
new_param_dict
)
# Query the stat.
...
...
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