Commit 8640ccb4 authored by Jérome Perrin's avatar Jérome Perrin

web: depend on erp5_crm

"contact us" feature of erp5_web uses erp5_crm

testTemplateTool depend on the actual order of installation of business
template, so update it now that the order has changed.

configurator scripts also had to be updated, so that
erp5_ingestion_mysql_innodb_catalog is installed before erp5_web/erp5_crm
because since erp5_crm depends on ingestion, it will install
erp5_ingestion_mysql_innodb_catalog, which has new tables and SQL methods
for indexation, so it needs to be installed with `update_catalog=True`.

As we can see here, configurator uses installBusinessTemplateListFromRepository
to install business templates one by one (in the same order that they are
added with addConfigurationItem), and pass update_catalog only for
business templates which add new tables/indexation methods and needs a
catalog update after install, but what happened is that we install
erp5_web with update_catalog=False, which will install
erp5_ingestion_mysql_innodb_catalog, also with update_catalog=False so
the activities to install business templates fail with errors like:

    ProgrammingError: (1146, "Table 'erp5_test_*.email' doesn't exist")
parent d2ba9601
...@@ -4,9 +4,9 @@ bt5_installation_list = ('erp5_simulation', ...@@ -4,9 +4,9 @@ bt5_installation_list = ('erp5_simulation',
'erp5_dhtml_style', 'erp5_dhtml_style',
'erp5_jquery', 'erp5_jquery',
'erp5_jquery_ui', 'erp5_jquery_ui',
'erp5_web',
'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion', 'erp5_ingestion',
'erp5_web',
'erp5_dms', 'erp5_dms',
'erp5_crm', 'erp5_crm',
'erp5_pdm', 'erp5_pdm',
......
configuration_save = context.restrictedTraverse(configuration_save_url) configuration_save = context.restrictedTraverse(configuration_save_url)
bt5_installation_list = ('erp5_jquery', bt5_installation_list = ('erp5_jquery',
'erp5_web',
'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion', 'erp5_ingestion',
'erp5_web',
'erp5_ui_test_core', 'erp5_ui_test_core',
'erp5_dms', 'erp5_dms',
'erp5_jquery_ui', 'erp5_jquery_ui',
...@@ -12,7 +12,7 @@ bt5_installation_list = ('erp5_jquery', ...@@ -12,7 +12,7 @@ bt5_installation_list = ('erp5_jquery',
'erp5_run_my_doc', 'erp5_run_my_doc',
'erp5_run_my_doc_role') 'erp5_run_my_doc_role')
bt5_update_catalog = ('erp5_ingestion_mysql_innodb_catalog') bt5_update_catalog = ('erp5_ingestion_mysql_innodb_catalog',)
for name in bt5_installation_list: for name in bt5_installation_list:
configuration_save.addConfigurationItem("Standard BT5 Configurator Item", configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
......
...@@ -755,10 +755,9 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -755,10 +755,9 @@ class TestTemplateTool(ERP5TypeTestCase):
ordered_list = template_tool.sortBusinessTemplateList(new_bt5_list) ordered_list = template_tool.sortBusinessTemplateList(new_bt5_list)
# group orders # group orders
first_group = range(0, 5) first_group = range(0, 5)
second_group = range(5, 11) second_group = range(5, 12)
third_group = range(11, 12) third_group = range(12, 14)
fourth_group = range(12, 14) fourth_group = range(14, 15)
fifth_group = range(14, 15)
expected_position_dict = { expected_position_dict = {
'erp5_property_sheets': first_group, 'erp5_property_sheets': first_group,
...@@ -772,10 +771,10 @@ class TestTemplateTool(ERP5TypeTestCase): ...@@ -772,10 +771,10 @@ class TestTemplateTool(ERP5TypeTestCase):
'erp5_ingestion_mysql_innodb_catalog': second_group, 'erp5_ingestion_mysql_innodb_catalog': second_group,
'erp5_base': second_group, 'erp5_base': second_group,
'erp5_knowledge_pad': second_group, 'erp5_knowledge_pad': second_group,
'erp5_ingestion': third_group, 'erp5_ingestion': second_group,
'erp5_web': fourth_group, 'erp5_web': third_group,
'erp5_crm': fourth_group, 'erp5_crm': third_group,
'erp5_credential': fifth_group} 'erp5_credential': fourth_group}
for bt in ordered_list: for bt in ordered_list:
self.assertTrue(ordered_list.index(bt) in expected_position_dict[bt[1]], self.assertTrue(ordered_list.index(bt) in expected_position_dict[bt[1]],
......
erp5_core (>= 5.4.3) erp5_core (>= 5.4.3)
erp5_xhtml_style erp5_xhtml_style
erp5_base erp5_crm
erp5_jquery erp5_jquery
erp5_knowledge_pad erp5_knowledge_pad
\ No newline at end of file
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