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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
460e8361
Commit
460e8361
authored
Apr 02, 2016
by
Boris Kocherov
Committed by
Boris Kocherov
Nov 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add isFiltred in backend
parent
29aa0cc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+24
-6
product/ERP5Form/Selection.py
product/ERP5Form/Selection.py
+1
-1
No files found.
product/ERP5Form/ListBox.py
View file @
460e8361
...
...
@@ -706,22 +706,40 @@ class ListBoxRenderer:
# we show all rows and do not care to hide anything
return
0
# ignore_hide_rows parameter force to display the content
ignore_hide_rows
=
REQUEST
.
get
(
'ignore_hide_rows'
,
0
)
if
ignore_hide_rows
:
return
0
return
self
.
isNotFiltered
()
@
lazyMethod
def
isFiltered
(
self
):
"""Return True if listbox content filtered
"""
return
not
self
.
isNotFiltered
()
@
lazyMethod
def
isNotFiltered
(
self
):
"""Return False if listbox content filtered
"""
# Always display lines in report mode
if
self
.
isReportTreeMode
():
return
0
# In domain mode, returns lines only if a domain is selected
if
self
.
isDomainTreeMode
():
if
self
.
getDomainSelection
(
):
domain_selection
=
self
.
getDomainSelection
()
if
domain_selection
and
(
len
(
domain_selection
)
>
0
):
return
0
# ignore_hide_rows parameter force to display the content
ignore_hide_rows
=
REQUEST
.
get
(
'ignore_hide_rows'
,
0
)
if
ignore_hide_rows
:
# Always display lines in invert mode (filter by checked uids)
if
self
.
getSelection
().
isInvertMode
():
return
0
# we could hide rows only if missing in request or selection search criterions
selection_params
=
self
.
getSelection
().
getParams
()
REQUEST
=
self
.
request
# Try to get workflow state parameter, in order to always allow worklist display
# guess all column names from catalog schema
...
...
product/ERP5Form/Selection.py
View file @
460e8361
...
...
@@ -433,7 +433,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent):
setattr
(
self
,
k
,
v
)
def
__len__
(
self
):
return
len
(
self
.
domain_dict
)
return
len
(
[
1
for
i
in
self
.
domain_dict
if
i
is
not
None
]
)
security
.
declarePublic
(
'getCategoryList'
)
def
getCategoryList
(
self
):
...
...
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