summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/upgrade_fields.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-03-07 16:14:05 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit86a87aa8b0dde2237cfe1bb769724e8ed269b62e (patch)
tree472de08242d81d1811c23dbfcd4381a903917d85 /addons/web/static/src/js/fields/upgrade_fields.js
parent78c97e6cc4c90036e68ad8f82b3c7d326b321067 (diff)
[REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to update all calls.
Diffstat (limited to 'addons/web/static/src/js/fields/upgrade_fields.js')
-rw-r--r--addons/web/static/src/js/fields/upgrade_fields.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/fields/upgrade_fields.js b/addons/web/static/src/js/fields/upgrade_fields.js
index bbfd9b5b5d1..a4246983dd1 100644
--- a/addons/web/static/src/js/fields/upgrade_fields.js
+++ b/addons/web/static/src/js/fields/upgrade_fields.js
@@ -37,9 +37,12 @@ var AbstractFieldUpgrade = {
*/
_confirmUpgrade: function () {
var args = [[["share", "=", false]]];
- return this.performModelRPC('res.users', 'search_count', args).then(function (data) {
- framework.redirect("https://www.odoo.com/odoo-enterprise/upgrade?num_users=" + data);
- });
+ return this._rpc('res.users', 'search_count')
+ .args(args)
+ .exec()
+ .then(function (data) {
+ framework.redirect("https://www.odoo.com/odoo-enterprise/upgrade?num_users=" + data);
+ });
},
/**
* This function is meant to be overriden to insert the 'Enterprise' label