odoo/odoo#194710

Created by Manu Vaillant (manv)
Merged at 1727bc8344a6cb333ad320b52dc1070e3b49cce9

Statuses:

label
odoo-dev:saas-18.1-fix-search-customer-manv
head
c8bff784b01fedba94dda892958609333fc9bfe3
merged
9 months ago by POS IoT, David Monnom (moda)
odoo/odoo
saas-18.1 #194710
saas-18.2
saas-18.3
saas-18.4
19.0
master #194757

[IMP] point_of_sale: partner list infinite scroll

Fix multiple issues with partner list :
- The list was not updated when scrolling down
- When searching customers, the partner list could contains duplicate (because before this commit a Set structure was used to store objects. This wasn't working as expecting because in JS a Set use references of objects to compare them (now we use a set to store unique IDs).
- Traceback occured when following these steps :
- Open "Customer" popup
- Type "ss"
- Press "enter" => Traceback

Here is how it works now:
- When reaching 80% (scroll) of the partner list, we fetch 100 more partners and add them to the list
- When typing in search bar: search inside the fetched partner list
- Press enter in search bar: fetch new customer matching the search from database

task-4489331

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr