From bd20ddc9b850b27a7f3d8457d60a6b60580bc1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 9 Aug 2005 21:37:51 +0000 Subject: [PATCH] check existance of methods before calling them, as manage_editActionForm is also called on the standard CMF Actions Tool at erp5/portal_actions/manage_editActionForm git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3563 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/CMFCorePatch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/CMFCorePatch.py b/product/ERP5Type/CMFCorePatch.py index 86f9c6b856..e48413196c 100755 --- a/product/ERP5Type/CMFCorePatch.py +++ b/product/ERP5Type/CMFCorePatch.py @@ -209,9 +209,11 @@ class PatchedActionProviderBase(ActionProviderBase): a1['category'] = a.getCategory() or 'object' a1['visible'] = a.getVisibility() a1['action'] = a.getActionExpression() - a1['icon'] = a.getIconExpression() a1['condition'] = a.getCondition() - a1['optional'] = a.getOption() + if hasattr(a, 'getIconExpression') : + a1['icon'] = a.getIconExpression() + if hasattr(a, 'getOption') : + a1['optional'] = a.getOption() actions.append(a1) # possible_permissions is in AccessControl.Role.RoleManager. -- 2.30.9