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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
24277038
Commit
24277038
authored
Mar 30, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Aug 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Simplify manage_exportProperties function
parent
38c8b78e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+2
-11
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
24277038
...
@@ -738,19 +738,10 @@ class Catalog(Folder,
...
@@ -738,19 +738,10 @@ class Catalog(Folder,
for
item
in
item_list
:
for
item
in
item_list
:
f
.
write
(
' <item type="str">%s</item>
\
n
'
%
escape
(
str
(
item
)))
f
.
write
(
' <item type="str">%s</item>
\
n
'
%
escape
(
str
(
item
)))
f
.
write
(
' </property>
\
n
'
)
f
.
write
(
' </property>
\
n
'
)
# XXX Although filters are not properties, output filters here.
# Filters are now propeties in ERP5 SQL Method(s)
# XXX Ideally, filters should be properties in Z SQL Methods, shouldn't they?
filter_dict
=
self
.
_getFilterDict
()
filter_dict
=
self
.
_getFilterDict
()
if
filter_dict
:
if
filter_dict
:
filter_list
=
[]
for
filter_id
,
filter_def
in
sorted
(
filter_dict
.
iteritems
()):
for
filter_id
in
filter_dict
.
keys
():
filter_definition
=
filter_dict
[
filter_id
]
filter_list
.
append
((
filter_id
,
filter_definition
))
# Sort for easy diff
filter_list
.
sort
(
key
=
lambda
x
:
x
[
0
])
for
filter_item
in
filter_list
:
filter_id
=
filter_item
[
0
]
filter_def
=
filter_item
[
1
]
if
not
filter_def
[
'filtered'
]:
if
not
filter_def
[
'filtered'
]:
# If a filter is not activated, no need to output it.
# If a filter is not activated, no need to output it.
continue
continue
...
...
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