Daily updates from Odoo
Thursday, October 31, 2019
2 changes · master
Enhancements to existing features
Website editors can now install missing snippet modules directly from the editor after confirming they want to save their current changes. This keeps users in their editing flow and reloads the page back into edit mode once installation is complete.
Original PR description
In the editor, the snippets from uninstalled module are shown with the possibility to install the module to get snippet. Before this commit: When clicking on it, it will redirect to the module page, in the backend from where you can install the module. Now: A popup will be shown to save current changes and install the module. The installation will be done without changing page, in the editor. Once done, the page will reload in editor enabled mode. task-2089285
Resolved issues and error corrections
This fixes a routing cache issue that could make newly installed apps, such as Discuss, appear to have missing or unknown pages on a fresh database. The change ensures routing information is rebuilt correctly during installation and not incorrectly reused across databases.
Original PR description
Initial b6ed34e1 idea was to ensure that we always have _rewrite_len and _routing_map defined. Unfortunately, this is not always correct since class attribute defined dynamically are actually added in registry, and recomputed on each install. After b6ed34e1, after installing discuss on a fresh database without demo, all discuss routes will be unknown since None is already in _routing_map and thus routing_map is not recomputed. When routing_map is in registry class, the install will remove the _routing_map attribute, which will fix the problem.