summaryrefslogtreecommitdiff
path: root/addons/base_import/static/src
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/base_import/static/src
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/base_import/static/src')
-rw-r--r--addons/base_import/static/src/js/import_action.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/base_import/static/src/js/import_action.js b/addons/base_import/static/src/js/import_action.js
index 11b81a6373a..03c258868a1 100644
--- a/addons/base_import/static/src/js/import_action.js
+++ b/addons/base_import/static/src/js/import_action.js
@@ -1,11 +1,11 @@
odoo.define('base_import.import', function (require) {
"use strict";
+var AbstractAction = require('web.AbstractAction');
var ControlPanelMixin = require('web.ControlPanelMixin');
var core = require('web.core');
var session = require('web.session');
var time = require('web.time');
-var Widget = require('web.Widget');
var QWeb = core.qweb;
var _t = core._t;
@@ -44,7 +44,7 @@ function jsonp(form, attributes, callback) {
$(form).ajaxSubmit(attributes);
}
-var DataImport = Widget.extend(ControlPanelMixin, {
+var DataImport = AbstractAction.extend(ControlPanelMixin, {
template: 'ImportView',
opts: [
{name: 'encoding', label: _lt("Encoding:"), value: 'utf-8'},