diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml index 8679c20845a382f8522ebeb4c6cd97921fc875b5..aa14899398d49a4efa4ac5f2f948745103dce54a 100644 --- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml +++ b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_getUpgraderSignature.xml @@ -153,6 +153,11 @@ REQUIRED_BT5_ID_LIST = ("erp5_core",\n "express_customisation",\n )\n \n +# A list bt5 which are required to upgrade catalog.\n +# After the bt5 be updated, update catalog will be trigger.\n +UPDATE_CATALOG_BT5_ID_LIST = ()\n +\n +\n # Call some scripts inside same transaction before or after BT update\n BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT = {}\n AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT = {\'erp5_mysql_innodb_catalog\': (\'ERP5Site_updateSitePropertyForTestOnly\',)}\n @@ -554,6 +559,7 @@ signature_dict = {\n , \'required_bt5_id_list\': REQUIRED_BT5_ID_LIST\n # Provides a list of bt5 which can be upgraded by the upgrader (if already installed)\n , \'upgradable_bt5_id_list\': UPGRADABLE_BT5_ID_LIST\n + , \'update_catalog_bt5_id_list\' : UPDATE_CATALOG_BT5_ID_LIST\n , \'before_triggered_bt5_id_dict\': BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT\n , \'after_triggered_bt5_id_dict\': AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT\n # Provide a list of bt5 which require reinstallation\n @@ -631,6 +637,7 @@ else:\n <string>_getattr_</string> <string>UPGRADABLE_BT5_ID_LIST</string> <string>REQUIRED_BT5_ID_LIST</string> + <string>UPDATE_CATALOG_BT5_ID_LIST</string> <string>BEFORE_TRIGGERED_BT5_SCRIPT_ID_DICT</string> <string>AFTER_TRIGGERED_BT5_SCRIPT_ID_DICT</string> <string>REINSTALABLE_BT5_ID_LIST</string> diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeBusinessTemplateList.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeBusinessTemplateList.xml index 79799407ba7e09131633f6c2970c5748644ced3b..78e2e8927ecbcacdb7ae4eaf785bd7378be0b3f5 100644 --- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeBusinessTemplateList.xml +++ b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeBusinessTemplateList.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> </pickle> <pickle> <dictionary> @@ -94,6 +91,8 @@ upgradable_bt5_id_list = signature[\'upgradable_bt5_id_list\']\n reinstalable_bt5_id_list = signature[\'reinstalable_bt5_id_list\']\n before_triggered_bt5_id_dict = signature[\'before_triggered_bt5_id_dict\']\n after_triggered_bt5_id_dict = signature[\'after_triggered_bt5_id_dict\']\n +update_catalog_bt5_id_list = signature[\'update_catalog_bt5_id_list\']\n +\n \n base_url_list = signature[\'bt5_base_url_list\']\n installed_bt5_title_list = [o.getTitle() for o in portal_templates.getInstalledBusinessTemplateList()]\n @@ -117,7 +116,7 @@ def installBT5(bt5_title, previous_bt5, bt5_counter):\n # We must make sure all documents from previous installations \n # are already indexed (specially categories).\n kw[\'after_method_id\'] = "immediateReindexObject"\n - update_catalog = portal_templates.TemplateTool_isUpdateCatalogRequired(bt5_title)\n + update_catalog = bt5_title in update_catalog_bt5_id_list \n before_triggered_bt5_id_list = before_triggered_bt5_id_dict.get(bt5_title, ())\n after_triggered_bt5_id_list = after_triggered_bt5_id_dict.get(bt5_title, ())\n keep_original_list = signature[\'keep_original_dict\'].get(bt5_title, ())\n @@ -227,6 +226,7 @@ return message_list\n <string>reinstalable_bt5_id_list</string> <string>before_triggered_bt5_id_dict</string> <string>after_triggered_bt5_id_dict</string> + <string>update_catalog_bt5_id_list</string> <string>base_url_list</string> <string>append</string> <string>$append0</string> diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/TemplateTool_isUpdateCatalogRequired.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/TemplateTool_isUpdateCatalogRequired.xml deleted file mode 100644 index 2371f9b9a2948d7b0aa449a301ebaf1195643062..0000000000000000000000000000000000000000 --- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/TemplateTool_isUpdateCatalogRequired.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <item> - <key> <string>_bind_names</string> </key> - <value> - <object> - <klass> - <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>_asgns</string> </key> - <value> - <dictionary> - <item> - <key> <string>name_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <item> - <key> <string>name_subpath</string> </key> - <value> <string>traverse_subpath</string> </value> - </item> - </dictionary> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>_body</string> </key> - <value> <string>"""\n - By default the upgrade is never required for None of\n - Business template.\n -\n - This script will be probably rewrite on other skin folder.\n -"""\n -return 0\n -</string> </value> - </item> - <item> - <key> <string>_code</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string>bt5_title</string> </value> - </item> - <item> - <key> <string>errors</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>func_code</string> </key> - <value> - <object> - <klass> - <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>co_argcount</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>bt5_title</string> - </tuple> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>func_defaults</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>TemplateTool_isUpdateCatalogRequired</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_upgrader/bt/revision b/bt5/erp5_upgrader/bt/revision index 40ca05e7ba3a6947e1ead5d6607b994de5d8ffc2..b18fcc5ba20b46f0d2e054e2f0fe5290e5f25b14 100644 --- a/bt5/erp5_upgrader/bt/revision +++ b/bt5/erp5_upgrader/bt/revision @@ -1 +1 @@ -534 \ No newline at end of file +535 \ No newline at end of file