Wednesday, August 26, 2026
2 changes · 19.0
Resolved issues and error corrections
Point of Sale now asks the browser to keep its offline data safe from automatic deletion when device storage is low. This reduces the risk of losing unsynced orders, helping avoid missing sales, closing differences, and accounting issues.
Original PR description
All PoS offline data, including orders not yet synced to the server, lives in indexedDB. By default this storage is "best-effort": when the device runs low on disk space, the browser is allowed to silently evict an entire origin's data. On a PoS terminal holding unsynced orders, such an eviction permanently loses those orders (sales missing from the session, "Difference at closing", unbalanced accounting entries). This PR requests persistent storage with `navigator.storage.persist()` when the data service initializes indexedDB. When granted, the origin's storage is exempted from automatic eviction; data can then only be removed by an explicit user action. The request is best-effort: Chrome grants or denies it silently based on engagement heuristics (it is always granted for an installed PWA), Firefox prompts the user once. The call is therefore not awaited in the startup path and its outcome is only logged. See https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist
This fixes stock quantities when a product is changed to be storable after stock movements already occurred. It helps keep on-hand inventory, stock accounting, forecasts, and historical inventory reports aligned with actual movements.
Original PR description
Since commit 680488cca2344a90d2a3864d26a03ade21ace268, it is now possible to change 'is_storable' after having validated stock moves. This means that if you validate moves while `is_storable = False`, then enable `is_storable`, the On Hand quantity will no longer correspond to the sum of the moved quantities. This means that the following features (that assume that the quantities between the moves and quants match) will no longer be reliable: - Stock Accounting (_run_avco / _run_fifo) - Forecast Report (past values) - Inventory At Date This commit is just a POC. TODO: - Add a warning on 'is_storable' change to let users know about the impact of the change. - Add tests --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr