Skip to content

Commit

Permalink
[FIX] web: Fix traceback while clicking on company icon to edit the c…
Browse files Browse the repository at this point in the history
…ompany data.
  • Loading branch information
dli-odoo committed Feb 16, 2018
1 parent 4c186f3 commit 9dd3f94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions addons/web/static/src/js/chrome/action_manager.js
Expand Up @@ -242,6 +242,15 @@ var ActionManager = Widget.extend({
});
},

/**
* Closes the current dialog, if any
* public method for closing current dialog
* @returns private method _closeDialog
*/
closeDialog: function (silent) {
return this._closeDialog(silent);
},

//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions addons/web/static/src/js/chrome/web_client.js
Expand Up @@ -81,10 +81,10 @@ return AbstractWebClient.extend({
headless: true,
};
self.action_manager.doAction(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);
var form = self.action_manager.currentDialogController.widget;
form.on("on_button_cancel", self.action_manager, self.action_manager.closeDialog);
form.on('record_saved', self, function() {
self.action_manager.dialog_stop();
self.action_manager.closeDialog();
self.update_logo();
});
});
Expand Down

0 comments on commit 9dd3f94

Please sign in to comment.