diff --git a/addons/web/static/src/views/form/form_controller.scss b/addons/web/static/src/views/form/form_controller.scss index 22cf27a9222..f2997a24d95 100644 --- a/addons/web/static/src/views/form/form_controller.scss +++ b/addons/web/static/src/views/form/form_controller.scss @@ -421,7 +421,7 @@ @include media-breakpoint-up(sm) { .o_inner_group { - grid-template-columns: fit-content(150px) 1fr; + grid-template-columns: fit-content(150px) minmax(0, 1fr); &.o_form_fw_labels { grid-template-columns: 150px 1fr; } diff --git a/addons/web/static/tests/views/form/form_view_tests.js b/addons/web/static/tests/views/form/form_view_tests.js index 48f0e1edf16..8461d02f87d 100644 --- a/addons/web/static/tests/views/form/form_view_tests.js +++ b/addons/web/static/tests/views/form/form_view_tests.js @@ -14268,8 +14268,13 @@ QUnit.module("Views", (hooks) => { const table = target.querySelector("table"); const group = target.querySelector(".o_inner_group:last-child"); + // Testing not overflowing on render assert.equal(group.clientWidth, group.scrollWidth); + + // Testing that the table will overflow if no value is calculated table.style.tableLayout = "auto"; + // Allow overflowing over the inner group for testing purpose + group.querySelectorAll(".o_cell").forEach((el) => (el.style.minWidth = "min-content")); assert.ok(group.clientWidth < group.scrollWidth); });