From 97cd3c98cd7dc199ec1bd6de534d6a7202be7bbc Mon Sep 17 00:00:00 2001 From: Kaushalya Mandaliya Date: Wed, 19 Feb 2020 07:26:39 +0000 Subject: [FIX] web: list: set proper width for the handle widget Before this commit, when creating the first record in an editable list (displaying no content helper), the width of the handle widget cell was correct while the row was in edition, but it was reset to 0 as soon as the record was saved. There are two places where this issue occurred: Journal Groups (Accounting) and Ticket Type (Helpdesk). After this commit, proper width will be set for the handle widget in the editable listview on the first record creation. task-2166338 closes odoo/odoo#46846 X-original-commit: 28b06e78b4940d3b6feb23c77c7de3441a50c0dc Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/js/views/list/list_editable_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js index 358ef8afc37..8b4db487ac4 100644 --- a/addons/web/static/src/js/views/list/list_editable_renderer.js +++ b/addons/web/static/src/js/views/list/list_editable_renderer.js @@ -662,7 +662,7 @@ ListRenderer.include({ const table = this.el.getElementsByTagName('table')[0]; let columnWidths = this.columnWidths; - if (!columnWidths) { // no column widths to restore + if (!columnWidths || !columnWidths.length) { // no column widths to restore // Set table layout auto and remove inline style to make sure that css // rules apply (e.g. fixed width of record selector) table.style.tableLayout = 'auto'; -- cgit v1.2.3