Hi,
In Odoo 18 POS, there are sum of orders that are unpaid due to some errors, the order is not fully processed, and i need to fetch that orders, is that is stored in local storage, how do i get that?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Projekt
- MRP
To pytanie dostało ostrzeżenie
Hello user,
I hope you are doing well
In Odoo 18, failed/unsynced POS orders are stored in the browser's IndexedDB (not localStorage).
1. POS UI: Look for a sync warning icon in the POS header - click to retry failed orders
2. Browser DevTools: Open F12 → Application → IndexedDB → look for “odoo-pos” database
3. Backend: Search pos.order with state = 'draft' for incomplete order
4. Auto-recovery: Reopening the POS session usually triggers automatic recovery of unsynced orders
I hope this information helps you
Thanks & Regards
Kunjan Patel
How do i code this in js?
async _clearPosOrder(){}
Hi,
Yes, in Odoo 18 POS any orders that fail to sync or remain unpaid due to processing errors are stored locally in the browser until the system reconnects. Depending on the version, POS may use LocalStorage (keys like pos.db or pos_orders) or, in newer OWL-based versions including Odoo 18, IndexedDB (database name pos-db with object stores like orders or sync_queue). You can inspect them through Developer Tools → Application → Local Storage/IndexedDB, and you can retrieve pending orders programmatically using IndexedDB by opening the pos-db database and reading all entries from the orders store. These unsynced orders appear when the POS is offline, closes unexpectedly, or receives a backend error, and Odoo will retry sending them when the connection is restored.
Hope it helps
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
1
paź 25
|
1079 | ||
|
|
2
wrz 25
|
1108 | ||
|
|
0
sie 25
|
1456 | ||
|
|
1
kwi 25
|
1604 | ||
|
|
1
kwi 25
|
2248 |
Hello,
async _clearPosOrder() {
const pos = this.env.services.pos;
// Get error/unsynced orders
const { orderToCreate, orderToUpdate } = pos.getPendingOrder();
const errorOrders = [...orderToCreate, ...orderToUpdate];
// Clear them
pos.clearPendingOrder();
// Or retry sync
await pos.syncAllOrders();
}
Key methods: getPendingOrder(), clearPendingOrder(), syncAllOrders()