Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web_editor, website: properly clean snippets before saving
/!\ Partial backport of odoo@0a31cb9 /!\ Should not be forward-ported Before the websitepocalypse introduced in 11.0 (saas-17), when saving a page in the editor, every `cleanForSave` method of snippet options were called, even for snippet options which were not initialized (so if a snippet was left unchanged before saving, the related `cleanForSave` methods were called anyway). This behavior was bad code and did not make much sense and was so removed with the websitepocalypse (see odoo@2972976#diff-4c580abda3220e45c6b3f6bdcf77c733L415) Unfortunatly, the behavior was necessary given the states of our snippet options. Indeed, for the "latest posts" snippet, the `cleanForSave` method removes the entire snippet content (as it is dynamically loaded). The dynamic loading is performed by the snippet *animation*... and removing the dynamic content should logically be done by the animation too... which is the case. The problem is that animations are not stopped before the editor is saved. This behavior was only implemented in saas-11.1 (for future version 12.0) with commit odoo@0a31cb9 As a stable fix for 11.0, part of the mentioned commit is backported here and some specific `cleanForSave` will be reviewed as animations if necessary. Note: `cleanForSave` made useless by this commit are left anyway as this is a stable fix. See odoo#22089
- Loading branch information