Commit 62e32406 authored by Nicolas Dumazet's avatar Nicolas Dumazet

simplify erp5_core specific code


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42786 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 762c1872
...@@ -4719,15 +4719,15 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -4719,15 +4719,15 @@ Business Template is a set of definitions, such as skins, portal types and categ
generator_class = getattr(site, '_generator_class', ERP5Generator) generator_class = getattr(site, '_generator_class', ERP5Generator)
gen = generator_class() gen = generator_class()
# update activity tool first if necessary # update activity tool first if necessary
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateTool(): if self.getTitle() == 'erp5_core':
if self.getTemplateUpdateTool():
gen.setupLastTools(site) gen.setupLastTools(site)
if not force: if not force and len(object_to_update) == 0:
if len(object_to_update) == 0:
# check if we have to update tools # check if we have to update tools
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateTool(): if self.getTemplateUpdateTool():
LOG('Business Template', 0, 'Updating Tools') LOG('Business Template', 0, 'Updating Tools')
gen.setup(site, 0, update=1) gen.setup(site, 0, update=1)
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateBusinessTemplateWorkflow(): if self.getTemplateUpdateBusinessTemplateWorkflow():
LOG('Business Template', 0, 'Updating Business Template Workflows') LOG('Business Template', 0, 'Updating Business Template Workflows')
gen.setupWorkflow(site) gen.setupWorkflow(site)
return return
...@@ -4780,12 +4780,13 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -4780,12 +4780,13 @@ Business Template is a set of definitions, such as skins, portal types and categ
# update tools if necessary # update tools if necessary
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateTool(): if self.getTitle() == 'erp5_core':
if self.getTemplateUpdateTool():
LOG('Business Template', 0, 'Updating Tools') LOG('Business Template', 0, 'Updating Tools')
gen.setup(site, 0, update=1) gen.setup(site, 0, update=1)
# check if we have to update business template workflow # check if we have to update business template workflow
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateBusinessTemplateWorkflow(): if self.getTemplateUpdateBusinessTemplateWorkflow():
LOG('Business Template', 0, 'Updating Business Template Workflows') LOG('Business Template', 0, 'Updating Business Template Workflows')
gen.setupWorkflow(site) gen.setupWorkflow(site)
# XXX keep TM in case update of workflow doesn't work # XXX keep TM in case update of workflow doesn't work
......
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