From 8881e61ec8512e504fcf798519745d73b68b5656 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Tue, 11 Jul 2017 17:18:19 +0200 Subject: [FIX] mail: make many2many_tags_email widget work This widget hasn't been rewritten with the new views. The purpose of this widget is to open a popup for each invalid partners (without email) in a many2many to fill the email. If the email is not set, the partner will not appear in the tags and its id will not be sent (which should not be the role of a widget but that's the way it is). --- addons/web/static/src/js/views/basic/basic_model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views') 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 906464a5a26..c562fa388f0 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -1187,7 +1187,8 @@ var BasicModel = AbstractModel.extend({ } var self = this; - var list = this.localData[record._changes[fieldName] || record.data[fieldName]]; + var localID = (record._changes && record._changes[fieldName]) || record.data[fieldName]; + var list = this.localData[localID]; var field = record.fields[fieldName]; var fieldInfo = record.fieldsInfo[viewType || record.viewType][fieldName]; var view = fieldInfo.views && fieldInfo.views[fieldInfo.mode]; -- cgit v1.2.3 From 0c496136a9e3eb4dd779e0ac019f1ed9341df152 Mon Sep 17 00:00:00 2001 From: Elkasitu Date: Thu, 13 Jul 2017 11:13:57 +0200 Subject: [FIX] web: Discard from form view to form view Clicking on the discard button in a form view whose previous view is another form view wouldn't do anything. This is fixed by making the view_manager trigger_up a history_back event and then the history_back callback will handle cases in which there is only one view and only one action, which used to be rejected --- addons/web/static/src/js/views/basic/basic_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views') diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index 82dc6f90d26..cc72816a85d 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -250,7 +250,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { on_fail: function (reason) { reload().always(function() { def.reject(reason); - }) + }); }, on_success: def.resolve.bind(def), }); -- cgit v1.2.3