summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorHardik Patel <hat@odoo.com>2017-09-04 11:41:10 +0530
committerAaron Bohy <aab@odoo.com>2017-09-19 10:14:24 +0200
commit116aa22685c8aa3babd87c8d1091a53fbf4ff35b (patch)
tree95ba2c2c038f5d7e769789845187822fbeee0745 /addons/web/static/src/js
parent8ba10a3b9ad8348ae867334adab80725543bd1b5 (diff)
[FIX] web: reset offset to 0 when searching for records
Scenario: Go to any list or kanban view: go to next page and set a filter that matches less that 'limit' record (e.g. less than 40), but at least one. No record will be displayed, because the offset is kept for the search_read. This rev. ensures to reset the offset to 0 when a search is done using the searchview.
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index 2e92ce004a9..c76c7aecc4a 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -26,7 +26,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
search: function(event) {
var d = event.data;
_.extend(this.env, this._process_search_data(d.domains, d.contexts, d.groupbys));
- this.active_view.controller.reload(_.extend({}, this.env));
+ this.active_view.controller.reload(_.extend({offset: 0}, this.env));
},
switch_view: function(event) {
if ('res_id' in event.data) {