From 793933a1287d08c174d7ba00ed4762d1807b4923 Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Tue, 25 Jun 2019 08:03:09 +0000 Subject: [PATCH] [FIX] web: fix wrapping of many2one in list view Before this fix, the many2one text in the list view was not wrapping. After this fix, the text will wrap according to the available space (managed automatically by the browser). closes odoo/odoo#34345 Signed-off-by: VincentSchippefilt --- addons/web/static/src/js/views/list/list_renderer.js | 1 + addons/web/static/src/scss/list_view.scss | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/list/list_renderer.js b/addons/web/static/src/js/views/list/list_renderer.js index cbe99715fb5..76db6727285 100644 --- a/addons/web/static/src/js/views/list/list_renderer.js +++ b/addons/web/static/src/js/views/list/list_renderer.js @@ -29,6 +29,7 @@ var FIELD_CLASSES = { integer: 'o_list_number', monetary: 'o_list_number', text: 'o_list_text', + many2one: 'o_list_many2one', }; var ListRenderer = BasicRenderer.extend({ diff --git a/addons/web/static/src/scss/list_view.scss b/addons/web/static/src/scss/list_view.scss index c64c84ee548..d1f656fc1e0 100644 --- a/addons/web/static/src/scss/list_view.scss +++ b/addons/web/static/src/scss/list_view.scss @@ -30,6 +30,10 @@ &.o_list_text { white-space: pre-wrap; } + &.o_list_many2one { + white-space: pre-wrap; + + } } tfoot { @@ -173,7 +177,9 @@ .o_list_record_remove_header, .o_handle_cell { width: 32px; } - + &>tbody>tr>td.o_list_many2one { + white-space: nowrap; + } // checkboxes in editable lists should be clickable and activate the row .o_data_row:not(.o_selected_row) .o_data_cell { .custom-checkbox:not(.o_readonly_modifier) {