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
- Contabilidad
- Inventario
- PoS
- Proyecto
- MRP
Se marcó esta pregunta
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
|
1
oct 25
|
1074 | ||
|
|
2
sept 25
|
1105 | ||
|
|
0
ago 25
|
1453 | ||
|
|
1
abr 25
|
1604 | ||
|
|
1
abr 25
|
2247 |
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()