diff --git a/product/ERP5Type/Core/ActionInformation.py b/product/ERP5Type/Core/ActionInformation.py index 2e4b11787abbbe37f233bafb1203c794c47721dc..d0e8d98015afcff8f92d810d10881e4190753485 100644 --- a/product/ERP5Type/Core/ActionInformation.py +++ b/product/ERP5Type/Core/ActionInformation.py @@ -165,3 +165,12 @@ class ActionInformation(XMLObject): self.getActionText(), self.getConditionText()] return ' '.join(filter(None, search_source_list)) + + security.declareProtected(AccessContentsInformation, 'getActionType') + def getActionType(self): + # Since we should have only one category that starts with + # 'action_type/' here, we call self.categories[0][12:] (12 is the + # length of 'action_type/'), instead of self.getActionType() for + # better performance. + categories = getattr(self, 'categories', []) + return len(categories) and categories[0][12:] or None