Commit c1787c0c authored by Ayush Tiwari's avatar Ayush Tiwari

[erp5_core]: Add action and property sheet for Python Script portal_type

Also, add condition to display the view only when the container is 'ERP5 Catalog'
parent ed423e7e
......@@ -87,6 +87,9 @@ class PythonScript(XMLObject, ZopePythonScript):
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.PythonScript
# CatalogFilter property_sheet needed for bootstrapping
# some Python Script during ERP5 Catalog installation
, PropertySheet.CatalogFilter
)
def __init__(self, *args, **kw):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>filter_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>3.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Filter</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Method_viewFilter</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: object.getParentValue().getPortalType() == \'Catalog\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -41,6 +41,9 @@
<portal_type id="Property Type Validity Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Python Script">
<item>CatalogFilter</item>
</portal_type>
<portal_type id="SQL Method">
<item>CatalogFilter</item>
<item>SQLMethod</item>
......
......@@ -104,6 +104,7 @@ Property Type Validity Constraint | view
PyData Script | proxy_role_view
PyData Script | repository_history_view
PyData Script | view
Python Script | filter_view
Python Script | proxy_role_view
Python Script | repository_history_view
Python Script | run
......
......@@ -12,6 +12,7 @@ Document Component | SortIndex
Extension Component | SortIndex
Property Existence Constraint | ConstraintType
Property Type Validity Constraint | ConstraintType
Python Script | CatalogFilter
SQL Method | CatalogFilter
SQL Method | SQLMethod
Script Constraint | ConstraintType
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment