summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-03-08 10:02:45 +0100
committerGéry Debongnie <ged@odoo.com>2018-03-08 16:48:54 +0100
commitb17ba359db785899d8a219b480f3209a5a2147f4 (patch)
tree2768621aee2662adcddd130aa3d0dfdb6a522c18 /addons/web/static/src/js/widgets
parent7ca93cd916a13ee8d46c1685454ae63b606ab547 (diff)
[REF] web,*: introduce the concept of AbstractAction
Before this commit, a client action was simply a subclass of Widget. This is quite simple, but not really enough for the ActionManager. The ActionManager needs to handle client actions in a different way that view actions. Sometimes, it needs to check if a method exists before calling it. With this commit, we introduce a new abstraction: the AbstractAction class, which defines a common API for all actions managed by the web client. Note that the API proposed in this commit is just the beginning. We will introduce other methods in the future, to manage the focus, or the scroll position, for example.
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/change_password.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/widgets/change_password.js b/addons/web/static/src/js/widgets/change_password.js
index b71ae4aaf4b..c05fa30408b 100644
--- a/addons/web/static/src/js/widgets/change_password.js
+++ b/addons/web/static/src/js/widgets/change_password.js
@@ -6,14 +6,14 @@ odoo.define('web.ChangePassword', function (require) {
* allows the user to change his password.
*/
+var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var Dialog = require('web.Dialog');
-var Widget = require('web.Widget');
var web_client = require('web.web_client');
var _t = core._t;
-var ChangePassword = Widget.extend({
+var ChangePassword = AbstractAction.extend({
template: "ChangePassword",
/**