[FIX] web: traceback when click on 'Edit Company data' button

Try to bind event without wait the action deferred
This commit is contained in:
Christophe Matthieu
2016-09-08 16:15:30 +02:00
parent 03b0fe1d64
commit 8bb4d9df68
+7 -6
View File
@@ -77,12 +77,13 @@ return AbstractWebClient.extend({
action_buttons: true,
headless: true,
};
self.action_manager.do_action(result);
var form = self.action_manager.dialog_widget.views.form.controller;
form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop);
form.on('record_saved', self, function() {
self.action_manager.dialog_stop();
self.update_logo();
self.action_manager.do_action(result).then(function () {
var form = self.action_manager.dialog_widget.views.form.controller;
form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop);
form.on('record_saved', self, function() {
self.action_manager.dialog_stop();
self.update_logo();
});
});
});
});