Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
2bd5e31f
Commit
2bd5e31f
authored
Apr 29, 2014
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Catalog.CatalogTool: Support all catalog columns in auto-generated related keys.
parent
4711e761
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+5
-4
No files found.
product/ERP5Catalog/CatalogTool.py
View file @
2bd5e31f
...
...
@@ -893,6 +893,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
default_string
=
'default_'
strict_string
=
'strict_'
related_string
=
'related_'
column_map
=
self
.
getSQLCatalog
(
sql_catalog_id
).
getColumnMap
()
for
key
in
key_list
:
prefix
=
''
strict
=
0
...
...
@@ -915,10 +916,10 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
related
=
end_key
.
startswith
(
related_string
)
if
related
:
end_key
=
end_key
[
len
(
related_string
):]
#
accept only some catalog column
s
if
end_key
in
(
'title'
,
'uid'
,
'description'
,
'reference'
,
'relative_url'
,
'id'
,
'portal_type'
,
'simulation_state'
):
#
XXX: joining with non-catalog tables is not trivial and require
s
# ZSQLCatalog's ColumnMapper cooperation, so only allow catalog
# columns.
if
'catalog'
in
column_map
.
get
(
end_key
,
()
):
is_uid
=
end_key
==
'uid'
if
is_uid
:
end_key
=
'uid'
if
related
else
'category_uid'
...
...
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