odoo/enterprise#81517

Created by fw-bot
Merged at 4ce9d1dc4a99d256197cbdc14999c328d849c11a

Statuses:

Linked pull requests
label
odoo-dev:saas-18.1-18.0-lazy_main_components-maki-422908-fw
head
9eb9069333264b9e95c425a5eae822f4aab64dcf
merged
4 months ago by Discuss, Maryam Kia (maki)
odoo/odoo odoo/enterprise
18.0 #201771 #81462
saas-18.1 #201897 #81517
saas-18.2 #201915 #81526

[FW][IMP] web_studio: registering main components via services

When we create a public root, we do:
- Create env
- Wait for services to load
- Create MainComponentsContainer

In a usual scenario, all the services are started in the second step above, so when we create the MainComponentsContainer, all the services we need are already
available. The problem with the lazy loading chatter bundle is that one of the
services in the second step is responsible for loading that bundle. So while
the lazy bundle is loading, new services and main components are being added to
the registry.

The steps could become like this:
- Create env
- Wait for services to start
- Start loading chatter bundle
- Lazy services (from chatter bundle) are not yet completely started
- Main components of the lazy bundle are added to the registry
- Lazy services are completely started

It might cause a crash due to unavailable services when the main components are added depends on the timing of the deployment of the lazy services.

This PR defines a new service for each main component that are added through the
chatter bundle to ensure that main components are registered when their
dependent services are deployed.

backport of #81327

Related to : odoo/odoo#201771

Forward-Port-Of: #81462