From 032d7e5833467e359f3d7ae92400bf0d477634f1 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 17 Aug 2016 11:00:00 +0200 Subject: [PATCH] Add missing bind on XXX2Many edit and add Changeset 5b447f80162c added async callbacks when opening and editing XXX2Many fields, but they were not bound to the correct object so the object properties are not read correcty. issue5780 review31411002 --- src/view/form.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/view/form.js b/src/view/form.js index e62afb98a1..a655f73ee0 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -2441,7 +2441,7 @@ title: this.attributes.string }); - }; + }.bind(this); var make_product = function() { if (jQuery.isEmptyObject(product)) { @@ -2474,8 +2474,8 @@ }; search_set(); - }); - }); + }.bind(this)); + }.bind(this)); }, open: function(event_) { this.edit(); @@ -2760,7 +2760,7 @@ screen.switch_view().done(function() { new Sao.Window.Form(screen, callback, {title: this.attributes.string}); - }); + }.bind(this)); }, new_: function() { var screen = this._get_screen_form(); @@ -2778,7 +2778,7 @@ title: this.attributes.string, rec_name: this.entry.val() }); - }); + }.bind(this)); } });