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
Ayush Tiwari
erp5
Commits
6ab023a5
Commit
6ab023a5
authored
Jun 28, 2016
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Use external method for getSQLCatalogIdList method from ZCatalog
parent
331db2f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
3 deletions
+46
-3
bt5/erp5_catalog_transition/ExtensionTemplateItem/portal_components/extension.erp5.UnrestrictedCallToCatalog.py
...al_components/extension.erp5.UnrestrictedCallToCatalog.py
+16
-1
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_getCatalogList.py
...Item/portal_skins/erp5_core/CatalogTool_getCatalogList.py
+1
-1
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_getSQLCatalogIdList.xml
...ortal_skins/erp5_core/CatalogTool_getSQLCatalogIdList.xml
+28
-0
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_viewCatalogList/my_default_sql_catalog_id.xml
...CatalogTool_viewCatalogList/my_default_sql_catalog_id.xml
+1
-1
No files found.
bt5/erp5_catalog_transition/ExtensionTemplateItem/portal_components/extension.erp5.UnrestrictedCallToCatalog.py
View file @
6ab023a5
...
...
@@ -104,4 +104,19 @@ def getPythonMethodIdsUnrestricted(self):
# Get current SQL Catalog objects
default_sql_catalog
=
portal
.
portal_catalog
.
getSQLCatalog
()
return
default_sql_catalog
.
getPythonMethodIds
()
\ No newline at end of file
return
default_sql_catalog
.
getPythonMethodIds
()
def
getSQLCatalogIdListUnrestricted
(
self
):
"""
This fucntion calls getSQLCatalogIdList function from ZCatalog Class.
The reason we need it here is that we need to get the result from the
restricted environment which isn't possible from inside ERP5.
This is because we are moving SQL Catalog inside ERP5 and converting it to
Folder object.
"""
# Get portal object
portal
=
self
.
getPortalObject
()
return
portal
.
portal_catalog
.
getSQLCatalogIdList
()
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_getCatalogList.py
View file @
6ab023a5
return
sorted
(
context
.
getPortalObject
().
portal_catalog
.
getSQLCatalogIdList
())
return
sorted
(
context
.
getPortalObject
().
portal_catalog
.
CatalogTool_
getSQLCatalogIdList
())
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_getSQLCatalogIdList.xml
0 → 100644
View file @
6ab023a5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getSQLCatalogIdListUnrestricted
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
CatalogUnrestricted
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
CatalogTool_getSQLCatalogIdList
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_catalog_transition/SkinTemplateItem/portal_skins/erp5_core/CatalogTool_viewCatalogList/my_default_sql_catalog_id.xml
View file @
6ab023a5
...
...
@@ -130,7 +130,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:here.getSQLCatalogIdList()
</string>
</value>
<value>
<string>
python:here.get
PortalObject().portal_catalog.CatalogTool_get
SQLCatalogIdList()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
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