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
6a66502d
Commit
6a66502d
authored
Dec 15, 2017
by
Kazuhiko Shiozaki
Committed by
Kazuhiko Shiozaki
Dec 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: use preferred category child item list method in Predicate tab.
parent
eecfbbe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.py
...erp5_core/Predicate_getMembershipCriterionCategoryList.py
+3
-2
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.py
View file @
6a66502d
...
...
@@ -8,16 +8,17 @@ for item in multimembership_base_list :
category_list
=
[]
display_method_id
=
context
.
getPortalObject
().
portal_preferences
.
getPreference
(
'preferred_category_child_item_list_method_id'
,
'getCategoryChildCompactLogicalPathItemList'
)
ctool
=
context
.
portal_categories
for
item
in
mixed_list
:
base_category
=
ctool
[
item
]
item_list
=
base_category
.
getCategoryChildCompactLogicalPathItemList
(
base
=
1
)[:]
item_list
=
getattr
(
base_category
,
display_method_id
)
(
base
=
1
)[:]
if
item_list
==
[[
''
,
''
]]:
for
fallback_category_id
in
base_category
.
getFallbackBaseCategoryList
():
fallback_category
=
ctool
.
restrictedTraverse
(
fallback_category_id
,
None
)
if
fallback_category
is
not
None
and
fallback_category
.
objectIds
():
item_list
.
extend
([(
'%s/%s'
%
(
fallback_category_id
,
x
[
0
]),
'%s/%s'
%
(
item
,
x
[
1
]))
\
for
x
in
fallback_category
.
getCategoryChildCompactLogicalPathItemList
(
base
=
1
)
if
x
[
0
]])
for
x
in
getattr
(
fallback_category
,
display_method_id
)
(
base
=
1
)
if
x
[
0
]])
break
category_list
.
extend
(
item_list
)
...
...
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