[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 <sad@odoo.com> Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -250,7 +250,9 @@
|
||||
</td>
|
||||
</t>
|
||||
<t t-if="column.type === 'widget'">
|
||||
<Widget t-props="column.props" record="record"/>
|
||||
<td class="o_data_cell" t-att-class="getCellClass(column, record)">
|
||||
<Widget t-props="column.props" record="record"/>
|
||||
</td>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
|
||||
@@ -15726,7 +15726,12 @@ QUnit.module("Views", (hooks) => {
|
||||
</list>
|
||||
`,
|
||||
});
|
||||
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"],
|
||||
|
||||
Reference in New Issue
Block a user