416500f6e3e17ecda5ee1ece1a1d274e5870eaab
We recently transitioned to async option methods, this allows us to have better control on the order of execution in the edition workflow, and among other things, keep the editor's UI in sync with the current state of the DOM. However, some snippet options (such as the number of columns option) need to remove or clone portions of the DOM, and as such, trigger the onClone or onRemove methods of the snippets contained in that portion if applicable. Because these methods are defined on other options, we first need to make sure all the snippetEditors for this portion are created, which is asynchronous. This commit adds support for an onSuccess callback to the 'clone_snippet' and 'remove_snippet' event handlers, such that options can choose to be notified when the work has been done, allowing them to wait for it before proceeding. This commit also adapts the layout_column snippet option to make use of that new feature, and remove code that was used as a workaround before, ie: precomputing the expected number of columns after the clone/remove, and using that number to adjust the width of the columns and update the UI. We can now just wait for the clone/remove, and use the real number of columns currently in the DOM. closes odoo/odoo#45343 X-original-commit: c159d58ce9cfca4a44f159b18eb10d1138977e23 Signed-off-by: Quentin Smetz (qsm) <qsm@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%