summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/report
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/report
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/report')
-rw-r--r--addons/web/static/src/js/report/client_action.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/report/client_action.js b/addons/web/static/src/js/report/client_action.js
index 2fd2ccd44b3..7041913c286 100644
--- a/addons/web/static/src/js/report/client_action.js
+++ b/addons/web/static/src/js/report/client_action.js
@@ -1,11 +1,11 @@
odoo.define('report.client_action', function (require) {
'use strict';
+var AbstractAction = require('web.AbstractAction');
var config = require('web.config');
var core = require('web.core');
var ControlPanelMixin = require('web.ControlPanelMixin');
var session = require('web.session');
-var Widget = require('web.Widget');
var utils = require('report.utils');
var QWeb = core.qweb;
@@ -17,7 +17,7 @@ var AUTHORIZED_MESSAGES = [
'report:do_action',
];
-var ReportAction = Widget.extend(ControlPanelMixin, {
+var ReportAction = AbstractAction.extend(ControlPanelMixin, {
template: 'report.client_action',