Commit b8cbf53d authored by Jérome Perrin's avatar Jérome Perrin

PythonScript: fix Zope2 compatibility

There is no zmi_icon on Zope2.
parent c0110369
Pipeline #28620 failed with stage
in 0 seconds
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from App.special_dtml import HTMLFile
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type import IS_ZOPE2
from Products.PythonScripts.PythonScript import \
PythonScript as ZopePythonScript
from Products.ERP5Type.mixin.expression import ExpressionMixin
......@@ -71,7 +72,8 @@ class PythonScript(XMLObject, ZopePythonScript, ExpressionMixin('expression')):
meta_type = 'ERP5 Python Script'
portal_type = 'Python Script'
add_permission = Permissions.AddPortalContent
zmi_icon = ZopePythonScript.zmi_icon
if not IS_ZOPE2:
zmi_icon = ZopePythonScript.zmi_icon
# Declarative security
security = ClassSecurityInfo()
......
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