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")
-
Owner
@romain did you know about this usage in StandardBT5ConfiguratorItem ? upgrader uses èTemplateTool.upgradeSite` which takes a list of business templates and install them in one transaction, where configurator uses another template tool API to install business templates one by one, with activities.
I think this might be a reason why configurator is slow, but the main problem is that we have two APIs and the approach of configurator ( install all business templates with
upgradeSite
, then fix catalog withupgradeSchema
) is much more robust and we don't have to think about "update catalog" because it's done automatically.I'm thinking we should one day change configurator to install business templates with the same way as upgrader, using a new configuration item that will have the list of business templates (instead of X configuration items having each one business template)
-
Owner
and the "main problem" is that we should not have to deal with order of business templates or with this update catalog flag, we now have API which takes care of this, so I believe should make configurator use the proper APIs and this would simplify this
-
Owner
I don't believe I ever checked how the configurator/upgrader installed the bt5.
But I'm not surprised that both use 2 different ways. You can also add 2 differents ways from
- unit tests
- erp5 UI
I also believe this should be unified. I tried to do this which Ayush some years ago, but the work was interrupted by other tasks.
-
Owner
I was about to say that we could drop maybe drop the "erp5 UI" (this part is really complex, with the interactivity to install/update only some parts), but thinking more, it's at least needed to update upgrader business template.
Anyway, for now, let's merge this, it will improve a bit editing the default web pages and start coding style on erp5_web.