[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.
This commit is contained in:
Hardik Patel
2017-09-19 10:14:24 +02:00
committed by Aaron Bohy
parent 8ba10a3b9a
commit 116aa22685
@@ -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) {