From 9f5819e0fd3ca332e301e38b5c0a0b6bb470ecdd Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Thu, 27 Oct 2022 12:29:59 +0000 Subject: [PATCH] [FIX] web: put widget inside td in list_renderer "div" as a child of "tr" is not really allowed. Because of this, custom widgets in a list_renderer are not properly styled resulting to issue where a widget doesn't take the full height of the parent "tr" element. This was missed during initial wowl porting so in this commit, we are putting the widget inside a "td" element. closes odoo/odoo#104475 X-original-commit: 092b6b66d998795a03de82be4d33990a138396e1 Signed-off-by: Samuel Degueldre Signed-off-by: Joseph Caburnay (jcb) --- addons/web/static/src/views/list/list_renderer.xml | 4 +++- addons/web/static/tests/views/list_view_tests.js | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/views/list/list_renderer.xml b/addons/web/static/src/views/list/list_renderer.xml index a3f363587a0..040284c7a77 100644 --- a/addons/web/static/src/views/list/list_renderer.xml +++ b/addons/web/static/src/views/list/list_renderer.xml @@ -250,7 +250,9 @@ - + + + diff --git a/addons/web/static/tests/views/list_view_tests.js b/addons/web/static/tests/views/list_view_tests.js index 289c5cfa0f2..179c2f3962b 100644 --- a/addons/web/static/tests/views/list_view_tests.js +++ b/addons/web/static/tests/views/list_view_tests.js @@ -15726,7 +15726,12 @@ QUnit.module("Views", (hooks) => { `, }); - assert.containsN(target, ".test_widget", 4, "there should be one widget per record"); + assert.containsN( + target, + "td .test_widget", + 4, + "there should be one widget (inside td) per record" + ); assert.deepEqual( [...target.querySelectorAll(".test_widget")].map((w) => w.textContent), ["true", "true", "true", "false"],