diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-03-08 10:02:45 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-03-08 16:48:54 +0100 |
| commit | b17ba359db785899d8a219b480f3209a5a2147f4 (patch) | |
| tree | 2768621aee2662adcddd130aa3d0dfdb6a522c18 /addons/web_settings_dashboard/static/src/js/dashboard.js | |
| parent | 7ca93cd916a13ee8d46c1685454ae63b606ab547 (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_settings_dashboard/static/src/js/dashboard.js')
| -rw-r--r-- | addons/web_settings_dashboard/static/src/js/dashboard.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_settings_dashboard/static/src/js/dashboard.js b/addons/web_settings_dashboard/static/src/js/dashboard.js index 8a4af041b20..1cdd7e55178 100644 --- a/addons/web_settings_dashboard/static/src/js/dashboard.js +++ b/addons/web_settings_dashboard/static/src/js/dashboard.js @@ -1,6 +1,7 @@ odoo.define('web_settings_dashboard', function (require) { "use strict"; +var AbstractAction = require('web.AbstractAction'); var core = require('web.core'); var framework = require('web.framework'); var Widget = require('web.Widget'); @@ -8,7 +9,7 @@ var Widget = require('web.Widget'); var QWeb = core.qweb; var _t = core._t; -var Dashboard = Widget.extend({ +var Dashboard = AbstractAction.extend({ template: 'DashboardMain', init: function(){ |
