c7b4035e26f91b08d94899e905362c805445f3c5
Since [1], dropping a form snippet generates a `TypeError: Cannot read properties of undefined (reading 'disconnect')`. Note that it only happens if this is the 1st snippet dropped, and if it is dropped as a section, not as inner content of another snippet. This is due to the SnippetEditor being destroyed before being started, as `destroy()` is synchronous but `start()` is async. A field from `s_website_form` (specifically the field `.s_website_form_dnone`) is removed through `_addHiddenField()` when dropping a new form. The result is that it gets destroyed immediately and tries to disconnect an observer that doesn't exist yet, but the async start() ends a little later - and creates + connects the observer that will never be disconnected. To solve the issue, this commit makes sure (1) in `destroy()` that the observer was initiated and (2) in `start()` that if the SnippetEditor was destroyed, it should not create an observer. [1]: https://github.com/odoo/odoo/commit/f64c9f2 task-3598997 closes odoo/odoo#142291 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%