[FIX] point_of_sale: searched orders should start at page 1

Create few validated orders. Then create other orders such that the
validated orders will be found at page 3. Search for an order
from the validated orders. BUG: You will see these searched orders
in page 3.

This commit fixes this issue by putting the search results in
page 1.

X-original-commit: 0a400313136ff7a7359d6105200522e859ce865d
This commit is contained in:
Joseph Caburnay
2020-10-08 15:46:00 +00:00
committed by Antoine Prieels
parent 589e91b4ad
commit 5939e22141
@@ -14,6 +14,9 @@ odoo.define('point_of_sale.OrderFetcher', function (require) {
this.cache = {};
this.totalCount = 0;
}
get activeOrders() {
return this.searchDomain ? [] : this.comp.env.pos.get('orders').models;
}
get nActiveOrders() {
return this.activeOrders.length;
}
@@ -164,7 +167,6 @@ odoo.define('point_of_sale.OrderFetcher', function (require) {
}
setComponent(comp) {
this.comp = comp;
this.activeOrders = this.comp.env.pos.get('orders').models;
return this;
}
setConfigId(configId) {