From 79fe1333a0302e31a2dd16e01db1b8aafcc438ad Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Thu, 9 Feb 2023 08:12:08 +0000 Subject: [PATCH 1/2] [FIX] web: fix x2many list overflow Purpose ======= Prevent the x2many list tables in notebook pages to overflow when having long chars in the cells or sections. Specifications ============== Because of the display inline-block css rule applied to the x2many field widgets, the table of the x2many list (in the notebook pages) are overflowing from the box when having long char in the cells or sections. Setting width 100% to the x2many field fixes the overflow behavior. Long chars are hidden with ellipsis or wrapped and displayed to a new line depending on the display. Task-3151054 X-original-commit: 2cd0106e63785dd34553c2b4747d72b93b9a7afd Part-of: odoo/odoo#112372 --- addons/web/static/src/views/form/form_controller.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/src/views/form/form_controller.scss b/addons/web/static/src/views/form/form_controller.scss index 4dec998b667..3b649072c1c 100644 --- a/addons/web/static/src/views/form/form_controller.scss +++ b/addons/web/static/src/views/form/form_controller.scss @@ -589,6 +589,10 @@ } } } + // Prevent table overflow when having long chars in x2many list + .o_field_widget:has(.o_field_x2many.o_field_x2many_list) { + width: 100%; + } } } From 0c700c387cecd28184c538260422136924e7a0a5 Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Wed, 8 Feb 2023 15:20:42 +0000 Subject: [PATCH 2/2] [REM] account: remove useless css Remove an unnecessary css rule, it was made global for all x2many list fields. Task-3151054 X-original-commit: 81cf885a9d102c86782f6742bbc98bccb1ee8344 Part-of: odoo/odoo#112372 --- .../section_and_note_backend.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_backend.scss b/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_backend.scss index 87ad2569c32..c1bbd6b50ce 100644 --- a/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_backend.scss +++ b/addons/account/static/src/components/section_and_note_fields_backend/section_and_note_backend.scss @@ -33,7 +33,3 @@ table.o_section_and_note_list_view tr.o_data_row { white-space: pre-wrap !important; } } - -.o_field_section_and_note_one2many { - width: 100%; -}