[Erp5-report] r29885 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 21 17:03:39 CEST 2009
Author: leonardo
Date: Wed Oct 21 17:03:36 2009
New Revision: 29885
URL: http://svn.erp5.org?rev=29885&view=rev
Log:
BusinessTemplates now store actions into the action_tool when the original destination is no longer an IActionProvider (approved by jm)
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=29885&r1=29884&r2=29885&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Wed Oct 21 17:03:36 2009
@@ -2446,6 +2446,16 @@
# Following code is for actions outside Types Tool.
# It will be removed when they are also converted to ERP5 actions.
+ from Products.CMFCore.interfaces import IActionProvider
+ if not IActionProvider.providedBy(container):
+ # some tools stopped being ActionProviders in CMF 2.x. Drop the
+ # action into portal_actions.
+ LOG('Products.ERP5.Document.BusinessTemplate', WARNING,
+ 'Misplaced action',
+ 'Attempted to store action %r in %r which is no longer an '
+ 'IActionProvided. Storing action on portal_actions instead' %
+ (id, path))
+ container = p.portal_actions
obj, action = container, obj
action_list = obj.listActions()
for index in range(len(action_list)):
More information about the Erp5-report
mailing list