diff --git a/product/ERP5/Document/PythonScript.py b/product/ERP5/Document/PythonScript.py index beb4804769f24e735697cb3077cf02c5d4b75459..de103acc7d8c147c51d9eb3b2b96b0570943f6b4 100644 --- a/product/ERP5/Document/PythonScript.py +++ b/product/ERP5/Document/PythonScript.py @@ -77,9 +77,10 @@ class PythonScript(XMLObject, ZopePythonScript, ExpressionMixin('expression')): security.declareObjectProtected(Permissions.AccessContentsInformation) #View content list, Force /view, Standart option in python scripts - manage_options = ( XMLObject.manage_options[0], + manage_options = ( ZopePythonScript.manage_options[0], {'icon':'', 'label':'View','action':'view'}) \ - + ZopePythonScript.manage_options + + ( XMLObject.manage_options[0], ) \ + + ZopePythonScript.manage_options[1:] # Declarative properties property_sheets = ( PropertySheet.Base diff --git a/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Python%20Script.xml b/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Python%20Script.xml index 83a6ccc762f58e68edb12d1488e3233cc8199581..53845b7b8f9b50c2c4eee3f62512f2c0370bca29 100644 --- a/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Python%20Script.xml +++ b/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Python%20Script.xml @@ -27,9 +27,7 @@ </item> <item> <key> <string>content_icon</string> </key> - <value> - <none/> - </value> + <value> <string>/misc_/PythonScripts/pyscript.gif</string> </value> </item> <item> <key> <string>description</string> </key> @@ -65,6 +63,18 @@ <key> <string>type_class</string> </key> <value> <string>PythonScript</string> </value> </item> + <item> + <key> <string>type_interface</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>type_mixin</string> </key> + <value> + <tuple/> + </value> + </item> </dictionary> </pickle> </record> diff --git a/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Workflow%20Script.xml b/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Workflow%20Script.xml index 71e2d1f83bcc342ac791476614a872603c624eb0..8b753e17948503e148ad40c4bb0d898fe4f83d35 100644 --- a/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Workflow%20Script.xml +++ b/product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Workflow%20Script.xml @@ -8,9 +8,7 @@ <dictionary> <item> <key> <string>content_icon</string> </key> - <value> - <none/> - </value> + <value> <string>/misc_/PythonScripts/pyscript.gif</string> </value> </item> <item> <key> <string>description</string> </key> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getPythonSourceCodeMessageList.py b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getPythonSourceCodeMessageList.py index e69966c4ccd19069a0ca616708ced14944a8bb45..78726a08371ddaac0d7c23d38dbd533b220064ff 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getPythonSourceCodeMessageList.py +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getPythonSourceCodeMessageList.py @@ -61,7 +61,7 @@ def checkPythonScript(script_instance, script_path): Message( location="{script_path}:{row}:{column}".format(**annotation), message=annotation['text'], - edit_url="{script_path}/manage_main?line={row}".format(**annotation),)) + edit_url="{script_path}/manage_workspace?line={row}".format(**annotation),)) def checkComponent(component_instance): """Check a component, adding messages to global `line_list` diff --git a/product/ERP5Type/patches/SourceCodeEditorZMI.py b/product/ERP5Type/patches/SourceCodeEditorZMI.py index a800d05db3e3c06f49b166041122bc4f0eff9286..862b5fb1d6602b65f9ea6e0617abb22f8c6c574a 100644 --- a/product/ERP5Type/patches/SourceCodeEditorZMI.py +++ b/product/ERP5Type/patches/SourceCodeEditorZMI.py @@ -58,7 +58,7 @@ def manage_page_footer(self): else: mode = 'html' textarea_selector = 'textarea[name="filedata:text"]' - elif document.meta_type in ('Script (Python)', ): + elif document.meta_type in ('Script (Python)', 'ERP5 Python Script', 'ERP5 Workflow Script', ): mode = 'python' textarea_selector = 'textarea[name="body:text"]' # printed is from RestrictedPython.RestrictionMutator the rest comes