Friday, September 11, 2026
2 changes · saas-19.3
Resolved issues and error corrections
Fixed an issue where some Point of Sale sessions could appear to close successfully even though the accounting entry was not created due to a rounding difference. Users will now see the expected Force Close Session wizard so the difference can be assigned to the correct account and accounting stays accurate.
Original PR description
When the closing journal entry of a session is unbalanced, `_process_session_validation` in point_of_sale rolls back the transaction and returns the "Force Close Session" wizard action, which…
When the closing journal entry of a session is unbalanced, `_process_session_validation` in point_of_sale rolls back the transaction and returns the "Force Close Session" wizard action, which `_validate_session` returns to the user so the difference can be posted on a chosen account. The pos_stock override of `_process_session_validation` calls `super()` without returning its result. The action is dropped, `_validate_session` carries on, and the session is written as `closed` while the rolled-back entry no longer exists: `move_id` is empty, the orders stay in `paid`, `cash_real_transaction` stays at 0 and the cash difference is never posted. The user sees a successful close and nothing in accounting. Steps to reproduce: - Use a stock configuration whose costs yield a rounding difference on the closing entry (e.g. AVCO products with a sale and a return whose unrounded costs round differently when split between the expense and valuation lines). - Close the session from the PoS. - The session is closed, no journal entry exists, and no wizard was shown. Return the result of `super()` so the wizard is shown as in 19.0. opw-6543863 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix stops Saudi invoices from being reset to draft while they are being submitted to ZATCA in production. It helps prevent accidental duplicate submissions that could create taxpayer compliance issues, while keeping test-mode workflows flexible.
Original PR description
Bulk sending is queued: the batch wizard stamps sending_data on the moves and lets the send cron do the work. Before this commit: Reset to Draft stayed available while the moves were being sent, so…
Bulk sending is queued: the batch wizard stamps sending_data on the moves and lets the send cron do the work. Before this commit: Reset to Draft stayed available while the moves were being sent, so the user could reset an invoice mid-submission. The invoice then ended up draft with an accepted submission and could be sent to ZATCA a second time, which ZATCA treats as a taxpayer compliance issue. After this commit: The records are locked on both sides, the way l10n_jo_edi does. Reading the state instead would not help, as a transaction only sees the snapshot taken when it started, in which the move is still posted. 1. When submitting, the moves that cannot be locked are skipped, as another transaction is already working on them. 2. When resetting to draft, the reset is refused if the records cannot be locked, otherwise it applies once the submission it races with committed. Reset to Draft stays available for invoices accepted in Sandbox and Simulation, as deleting or resubmitting test invoices is the point of those modes. Production remains covered by the l10n_sa_edi_is_production check. Steps to reproduce: 1. Install l10n_sa_edi and onboard a sales journal in Sandbox mode. 2. Create and post two invoices. 3. Select them, Action > Send & Print. 4. Select them again, Action > Reset to Draft. task-6267293 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr