Commit 03c751d4 by Klaus Wölfel

erp5_promise: fix full_text table not created when installing bt5s

Call upgradeSite with CATALOG_UPDATED to enable automatic catalog update
behaviour
1 parent 6a04ee21
......@@ -52,6 +52,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.CMFActivity.ActiveResult import ActiveResult\n
from Products.ERP5.Tool.TemplateTool import BusinessTemplateUnknownError\n
from Products.ERP5.Tool.TemplateTool import CATALOG_UPDATABLE\n
\n
portal = context.getPortalObject()\n
template_tool = portal.portal_templates\n
......@@ -66,7 +67,8 @@ bt5_list = bt5.split()\n
bt5_list.extend(template_tool.getInstalledBusinessTemplateTitleList())\n
\n
try:\n
message_list = template_tool.upgradeSite(bt5_list, dry_run=True)\n
message_list = template_tool.upgradeSite(bt5_list, dry_run=True,\n
update_catalog=CATALOG_UPDATABLE)\n
severity = len(message_list)\n
except BusinessTemplateUnknownError, error:\n
severity = -1\n
......
......@@ -50,7 +50,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
<value> <string>from Products.ERP5.Tool.TemplateTool import CATALOG_UPDATABLE\n
\n
portal = context.getPortalObject()\n
bt5 = portal.getPromiseParameter(\'portal_templates\', \'expected_bt5\')\n
\n
if bt5 is None:\n
......@@ -58,7 +60,7 @@ if bt5 is None:\n
\n
bt5_list = bt5.split()\n
bt5_list.extend(portal.portal_templates.getInstalledBusinessTemplateTitleList())\n
portal.portal_templates.upgradeSite(bt5_list)\n
portal.portal_templates.upgradeSite(bt5_list, update_catalog=CATALOG_UPDATABLE)\n
</string> </value>
</item>
<item>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!