From 8edfe6b32f779d8f0428e7be7a335fdfa7e44a89 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 15 Sep 2020 12:35:48 +0000 Subject: [FIX] web: list: call mounted on subcomponents at reload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue was spotted in list views containing the "badge" widget with decorations (e.g. in the Purchase Order list view). At first, the decorations were correctly applied, but they weren't anymore after a reload (e.g. after toggling a filter). They weren't because the list renderer didn't called 'on_attach_callback' on its subwidgets at reload (thus, 'mounted' wasn't called on its subcomponents, and the decorations are applied in the mounted hook). This commit moves the logic from the FormRenderer to the BasicRenderer, so that it applies on List, Kanban, and Form views. This commit also removes the transition scss rule on the badge field widget as it caused a flickering at reload. Task 2336440 closes odoo/odoo#57762 X-original-commit: 713bce22e8f412f2c26e663b9e30fdd64933ff0c Signed-off-by: Michaƫl Mattiello Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/scss/fields.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/scss') diff --git a/addons/web/static/src/scss/fields.scss b/addons/web/static/src/scss/fields.scss index 0e948c5921e..70436149d23 100644 --- a/addons/web/static/src/scss/fields.scss +++ b/addons/web/static/src/scss/fields.scss @@ -499,9 +499,10 @@ border: 0; font-size: 12px; user-select: none; - background-color: rgba(lightgray, 0.5);; + background-color: rgba(lightgray, 0.5); font-weight: 500; @include o-text-overflow; + transition: none; // remove transition to prevent badges from flickering at reload } } -- cgit v1.2.3