Commit 110e3024 authored by Jérome Perrin's avatar Jérome Perrin

make it possible to define a custom generator class, stored as _generator_class

attribute on the site.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15543 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de58b8b3
......@@ -4099,8 +4099,12 @@ Business Template is a set of definitions, such as skins, portal types and categ
self.checkDependencies()
site = self.getPortalObject()
from Products.ERP5.ERP5Site import ERP5Generator
gen = ERP5Generator()
custom_generator_class = getattr(site, '_generator_class', None)
if custom_generator_class is not None:
gen = custom_generator_class()
else:
from Products.ERP5.ERP5Site import ERP5Generator
gen = ERP5Generator()
# update activity tool first if necessary
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateTool():
LOG('Business Template', 0, 'Updating Activity Tool')
......
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