summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorMohammed Shekha <msh@odoo.com>2020-07-02 13:23:04 +0000
committerAaron Bohy <aab@odoo.com>2020-09-11 08:30:07 +0000
commit170cd2a0217c8d172115dee32e1e0e5e0451fc7a (patch)
treefc7e26d6e867bc220eb031a6aeff47069df970b6 /addons/web/static/src/js
parent5e5de2b2b64fd8cb259e72fc1a97dc754da871ad (diff)
[FIX] web: blank value in many2many_tags for multi_edit popup
Let's assume a list that is multi editable and contains a m2m field displayed with widget many2many_tags. Moreover, there are enough values in the comodel s.t. the 'Search More' option is available in the many2many_tags dropdown, and field 'display_name' isn't in the list view that opens in dialog. Enter multi-edition, edit the many2one field to add a value (click on 'Search More', and pick a value from the list): the picked value isn't correctly displayed in the confirmation dialog. The issue occurred because we didn't wait for the display_name to be fetched before opening the dialog. Task : 2150384 closes odoo/odoo#57481 X-original-commit: ccf5834045d8b4fff9af7ddf60814c3a640e8318 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Dhruv Patel <dhp@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js
index 5be80268cc6..bb599b2e859 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -1515,7 +1515,9 @@ var BasicModel = AbstractModel.extend({
}
if (options.notifyChange === false) {
- return Promise.resolve(_.keys(changes));
+ return Promise.all(defs).then(function () {
+ return Promise.resolve(_.keys(changes));
+ });
}
return Promise.all(defs).then(function () {