summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_model.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/views/graph/graph_model.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/views/graph/graph_model.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_model.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js
index 73578f5c3bc..7bf9757a255 100644
--- a/addons/web/static/src/js/views/graph/graph_model.js
+++ b/addons/web/static/src/js/views/graph/graph_model.js
@@ -130,13 +130,14 @@ return AbstractModel.extend({
if (this.chart.measure !== '__count__') {
fields = fields.concat(this.chart.measure);
}
- return this.performModelRPC(this.modelName, 'read_group', [], {
- context: this.chart.context,
- domain: this.chart.domain,
- fields: fields,
- groupby: this.chart.groupedBy,
- lazy: false,
- }).then(this._processData.bind(this));
+ return this._rpc(this.modelName, 'read_group')
+ .withContext(this.chart.context)
+ .withDomain(this.chart.domain)
+ .withFields(fields)
+ .groupBy(this.chart.groupedBy)
+ .lazy(false)
+ .exec()
+ .then(this._processData.bind(this));
},
/**
* Since read_group is insane and returns its result on different keys