diff options
| author | Antony Lesuisse <al@openerp.com> | 2017-10-04 20:05:05 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2017-10-04 20:22:22 +0200 |
| commit | 6b22476e20fb7eade959194bfabd94d353e2d5ff (patch) | |
| tree | fbad12338bed7d4f4b38b017cd746878f897b81c /addons/iap/static/src/js/dashboard.js | |
| parent | ea51b6b06f33fa97ace9c55bb86fceaeb60bb18a (diff) | |
[ADD] iap: In app purchase
IAP allow app publishers to charge for ongoing services. In that context, Odoo
acts mostly as a payment platform between the service user (client) and the service
provider (Odoo App developer).
Diffstat (limited to 'addons/iap/static/src/js/dashboard.js')
| -rw-r--r-- | addons/iap/static/src/js/dashboard.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/addons/iap/static/src/js/dashboard.js b/addons/iap/static/src/js/dashboard.js new file mode 100644 index 00000000000..b3490da2eda --- /dev/null +++ b/addons/iap/static/src/js/dashboard.js @@ -0,0 +1,29 @@ +odoo.define('iap.Dashboard', function (require) { +"use strict"; + +var ajax = require('web.ajax'); +var core = require('web.core'); +var Dashboard = require('web_settings_dashboard'); + +var _t = core._t; +var QWeb = core.qweb; + +Dashboard.Dashboard.include({ + /** + * @override + */ + load_apps: function (data) { + var _super = this._super.bind(this); + return ajax.jsonRpc('/web/dataset/call_kw', 'call', { + model: 'iap.account', + method: 'get_account_url', + args: [], + kwargs: {}, + }).then(function (url) { + data.apps.url = url; + return _super(data); + }); + }, +}); + +}); |
