[Erp5-report] r44607 vincent - /erp5/trunk/products/ERP5/Tool/DomainTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 25 10:37:52 CET 2011
Author: vincent
Date: Fri Mar 25 10:37:52 2011
New Revision: 44607
URL: http://svn.erp5.org?rev=44607&view=rev
Log:
Access tools directly from portal object.
Also, use self (we are a tool, so in an acquisiton context) instead of context
to reach portal.
Modified:
erp5/trunk/products/ERP5/Tool/DomainTool.py
Modified: erp5/trunk/products/ERP5/Tool/DomainTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/DomainTool.py?rev=44607&r1=44606&r2=44607&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/DomainTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/DomainTool.py [utf8] Fri Mar 25 10:37:52 2011
@@ -103,9 +103,10 @@ class DomainTool(BaseTool):
invoked with "test=False" value. Otherwise, it should only change
execution duration.
"""
- portal_catalog = context.portal_catalog
- portal_categories = context.portal_categories
- portal_preferences = context.portal_preferences
+ portal = self.getPortalObject()
+ portal_catalog = portal.portal_catalog
+ portal_categories = portal.portal_categories
+ portal_preferences = portal.portal_preferences
# Search the columns of the predicate table
column_list = [x.split('.')[1] for x in portal_catalog.getColumnIds()
if x.startswith('predicate.')]
More information about the Erp5-report
mailing list