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/iap/static/src | |
| 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/iap/static/src')
| -rw-r--r-- | addons/iap/static/src/js/iap_credit.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/iap/static/src/js/iap_credit.js b/addons/iap/static/src/js/iap_credit.js index 37cddd72aa8..baabd7bd980 100644 --- a/addons/iap/static/src/js/iap_credit.js +++ b/addons/iap/static/src/js/iap_credit.js @@ -1,13 +1,11 @@ odoo.define('iap.redirect_odoo_credit_widget', function(require) { "use strict"; +var AbstractAction = require('web.AbstractAction'); var core = require('web.core'); -var framework = require('web.framework'); -var Widget = require('web.Widget'); -var QWeb = core.qweb; -var IapOdooCreditRedirect = Widget.extend({ +var IapOdooCreditRedirect = AbstractAction.extend({ template: 'iap.redirect_to_odoo_credit', events : { "click .redirect_confirm" : "odoo_redirect", |
