From f2f0f11802fe6aae5331cd0fb50e86e7bc803355 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Mon, 1 Aug 2011 17:00:00 -0300 Subject: [PATCH] Drop getToolByName usage. --- .../Document/CustomerBT5ConfiguratorItem.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/product/ERP5Configurator/Document/CustomerBT5ConfiguratorItem.py b/product/ERP5Configurator/Document/CustomerBT5ConfiguratorItem.py index 5fc582d65d..0165bec135 100644 --- a/product/ERP5Configurator/Document/CustomerBT5ConfiguratorItem.py +++ b/product/ERP5Configurator/Document/CustomerBT5ConfiguratorItem.py @@ -30,7 +30,6 @@ import zope.interface from AccessControl import ClassSecurityInfo from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type.XMLObject import XMLObject -from Products.CMFCore.utils import getToolByName from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): @@ -59,10 +58,8 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): , PropertySheet.DublinCore ) def _build(self, business_configuration): - template_tool = getToolByName(self.getPortalObject(), - 'portal_templates') - bt5 = template_tool.newContent(portal_type="Business Template", \ - title=self.bt5_title) + bt5 = self.getPortalObject().portal_templates.newContent( + portal_type="Business Template", title=self.bt5_title) ## ..and set it as current business_configuration.setSpecialise(bt5.getRelativeUrl()) -- 2.30.9