[FIX] point_of_sale: always show selected partner at top of list

Before this commit, the selected partner was not shown at the top if
its id was outside those first 1000, because the partner list only
searched the first 1000 partners to display.

With this commit, the selected partner will always display at the top
of the list as expected, even if its id is outside the first 1000
partners queried.

opw-3470824

closes odoo/odoo#132510

X-original-commit: a55a5951ae97c5b702ee7cde525a24df68e1e1b1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
Pedram (PEBR)
2023-08-21 18:48:53 +02:00
parent 6ff6b23a89
commit 330f5ddb86
@@ -109,8 +109,8 @@ export class PartnerListScreen extends Component {
);
if (indexOfSelectedPartner !== -1) {
res.splice(indexOfSelectedPartner, 1);
res.unshift(this.state.selectedPartner);
}
res.unshift(this.state.selectedPartner);
}
return res;
}