Commit 31d56072 authored by Rafael Monnerat's avatar Rafael Monnerat

Only mark business configuration installed after the last activity run.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45109 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 03e92fd9
......@@ -382,7 +382,7 @@ class BusinessConfiguration(Item):
This is the actual implementation which can be used from workflow
actions and Configurator requets
"""
kw = dict(tag="start",
kw = dict(tag="start_configuration_%s" % self.getId(),
after_method_id=["recursiveImmediateReindexObject",
'immediateReindexObject'])
start = time.time()
......@@ -404,6 +404,7 @@ class BusinessConfiguration(Item):
time.time() - start))
if execute_after_setup_script:
kw["tag"] = "final_configuration_step_%s" % self.getId()
kw["after_method_id"] = ["build", 'immediateReindexObject', \
"recursiveImmediateReindexObject"]
......@@ -412,6 +413,9 @@ class BusinessConfiguration(Item):
"After setup script called (force) for %s : %s" %
(self.getRelativeUrl(), self.getSpecialise()))
if self.portal_workflow.isTransitionPossible(self, 'install'):
self.activate(after_tag=kw["tag"]).install()
security.declareProtected(Permissions.ModifyPortalContent, 'resetBusinessConfiguration')
def resetBusinessConfiguration(self):
"""
......
......@@ -481,9 +481,7 @@ class ConfiguratorTool(BaseTool):
self.REQUEST.set(key, value)
bc = self.restrictedTraverse(business_configuration)
# XXX FIXME we just have to build once.
bc.build()
bc.install()
finalize_method = getattr(self, 'ConfiguratorTool_finalizeInstallation', None)
if finalize_method is not None and callable(finalize_method):
......
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