summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2019-10-14 09:06:14 +0000
committerfw-bot <otis@odoo.com>2019-10-24 06:39:46 +0000
commite8d300723f77528d69120d586aa3d42d9a0f0d23 (patch)
treee1aad84ecc9117403c68640c32631b4ebe1eda5a /addons/web/static/src/js/views/form
parent337fd81157647e839beaad343d984046109e3b4b (diff)
[FIX] web: list: recompute default values for columns when visible
Before this commit, all the computation of the default widths for column headers was done before the list was attached to the DOM, meaning that no column was actually visible. This was a problem since columns that are meant to stay unseen were taken into account in the calculation of relative column widths. Now, the same algorithm runs once the columns are visible so that invisible columns can be properly excluded. fixes #38744 Task 2076721 X-original-commit: 4bf98b47898b075049975dfe597f0fb92c7c14d1
Diffstat (limited to 'addons/web/static/src/js/views/form')
-rw-r--r--addons/web/static/src/js/views/form/form_controller.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js
index bd31cddd50d..6134bada681 100644
--- a/addons/web/static/src/js/views/form/form_controller.js
+++ b/addons/web/static/src/js/views/form/form_controller.js
@@ -285,6 +285,14 @@ var FormController = BasicController.extend({
//--------------------------------------------------------------------------
/**
+ * @override
+ */
+ _applyChanges: async function () {
+ await this._super.apply(this, arguments);
+ core.bus.trigger('DOM_updated');
+ },
+
+ /**
* Archive the current selection
*
* @private
@@ -299,11 +307,11 @@ var FormController = BasicController.extend({
if (archive) {
return this.model
.actionArchive(ids, this.handle)
- .then(this.update.bind(this, {}, {reload: false}));
+ .then(this.update.bind(this, {}, {reload: false}));
} else {
return this.model
.actionUnarchive(ids, this.handle)
- .then(this.update.bind(this, {}, {reload: false}));
+ .then(this.update.bind(this, {}, {reload: false}));
}
},