f3e71d01eecfa186c5fcdc40fa6d4c2805207a76
The motivation of this commit comes from breadcrumbs. Breadcrumbs work as follows: for each controller in the stack of the ActionService, there is an entry in the breadcrumbs. Except for the last entry (which corresponds to the currently displayed controller), the value to display is computed by the ActionService and stored in this.env.config.breadcrumbs. For the last entry, we use the displayName set in this.env.config. When a view wants to update its displayName (e.g. the form view when we switch to another record), it updates the displayName in the config, which thus correctly updates the breadcrumbs. However, this doesn't change the internal values in the ActionService, so if another controller is stacked over the current one, the penultimate entry is wrong. To update the internal state of the ActionService, the event 'controller-title-updated' must be triggered as well, which is cumbersome. Note that we don't really face the issue yet because among already converted views, none of them need to update its displayName in the breadcrumbs. This commit aims at uniformizing the way the (n-1) first entries and the last one behave, by making the "breadcrumbs" key encode all breadcrumbs entries (the n-1 first ones, and the last, current one). We also replace the "displayName" key by "getDisplayName" such that it uses a single source of truth, located in the ActionService, and we provide a function "setDisplayName" to update it. Finally, this commit introduces the notion of "default config" which ensures that standalone views, or views in tests, have a valid config with expected keys. closes odoo/odoo#81031 Related: odoo/enterprise#22799 Signed-off-by: Géry Debongnie <ged@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%