summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorKaushalya Mandaliya <kma@odoo.com>2020-02-19 07:26:39 +0000
committerAaron Bohy <aab@odoo.com>2020-03-04 10:37:25 +0000
commit97cd3c98cd7dc199ec1bd6de534d6a7202be7bbc (patch)
tree39fc433a6351f04d118ca62cb16003f4c3c7133e /addons/web/static/src/js
parent65513ef3f92d82806d03bd5fe55c7f9af4f1484d (diff)
[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) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/list/list_editable_renderer.js2
1 files changed, 1 insertions, 1 deletions
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';