summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-03-17 15:42:50 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit357090428bd7207109b8ddbbd565fea2e86efb82 (patch)
tree80477cfa7cf3b5a8c49e136a7e8d71cda0bc68c1
parent82bb35cf797734a87a23b3feb4cd741e9745cc08 (diff)
[FIX] web: rpc: handle offset arg
Even if specified when building the rpc query, the offset wasn't given in the arguments of the performed RPC.
-rw-r--r--addons/web/static/src/js/core/rpc.js1
-rw-r--r--addons/web/static/test/core/rpc_tests.js2
2 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core/rpc.js b/addons/web/static/src/js/core/rpc.js
index 6c24dccfa0e..c18c7ac6809 100644
--- a/addons/web/static/src/js/core/rpc.js
+++ b/addons/web/static/src/js/core/rpc.js
@@ -192,6 +192,7 @@ var SearchRPCBuilder = BaseRPCBuilder.extend({
fields: this._fields,
limit: this._limit,
model: this._model,
+ offset: this._offset,
sort: this._orderBy
};
},
diff --git a/addons/web/static/test/core/rpc_tests.js b/addons/web/static/test/core/rpc_tests.js
index 7c196a1155d..10ab1b67a05 100644
--- a/addons/web/static/test/core/rpc_tests.js
+++ b/addons/web/static/test/core/rpc_tests.js
@@ -161,6 +161,7 @@ QUnit.module('core', {}, function () {
domain: ['a', '=', 1],
fields: ['name'],
limit: 32,
+ offset: 2,
model: 'partner',
sort: 'yop ASC, aa DESC',
}, "should have correct args");
@@ -170,6 +171,7 @@ QUnit.module('core', {}, function () {
.withDomain(['a', '=', 1])
.withFields(['name'])
.withLimit(32)
+ .withOffset(2)
.orderBy([{name: 'yop', asc: true}, {name: 'aa', asc: false}])
.exec();
});