Commit f2f0f118 authored by Rafael Monnerat's avatar Rafael Monnerat

Drop getToolByName usage.

parent 57229c6f
......@@ -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())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment