Monday, November 24, 2025
3 changes · saas-18.3
Enhancements to existing features
This update improves how GSTR-2B issues are classified and handled, so one previously unrecognized error is now treated as a warning instead of causing confusion. It also stops background jobs from reprocessing records that are already in an error state, reducing unnecessary work and making the process more reliable.
Original PR description
Before this commit: - `RET2B1017` error code was not handled. - Cron methods `_cron_get_gstr2b_data` and `_cron_gstr2b_match_data` processed all records with status: - `"waiting_reception"` - `"being_processed"` - Records with blocking level `"error"` were still being processed by cron. After this commit: - Added handling for `RET2B1017` and mapped it to `"warning"` level. - Updated cron domain filters to exclude records where `gstr2b_blocking_level = "error"`. - Cron jobs now skip invalid/error-state return periods, preventing unnecessary processing. Forward-Port-Of: odoo/enterprise#100150 Forward-Port-Of: odoo/enterprise#99378
This change makes the system much faster when finding delivery records linked to lots/serial numbers. It reduces database work and avoids repeated processing, which means better performance and shorter wait times for large inventories.
Original PR description
### Description: This refactoring replaces the recursive calculation in `_find_delivery_ids_by_lot` with an iterative process. This change significantly reduces the amount of database queries by prefetching and batching all required lines in a single pass, and it also eliminates the overhead caused by repeated recursive function calls. ### Benchmark: | Total Lots | Before | After | |------------|--------|--------| | 69 | 1 sec | 106 ms | | 1152 | 1 min | 5 sec | ### Reference: opw-5096599 Forward-Port-Of: odoo/odoo#236541 Forward-Port-Of: odoo/odoo#233478
Saudi invoices can now be backdated more reliably by letting the invoice issue date be set manually before confirmation. This helps keep Odoo’s invoice dates aligned with ZATCA VAT calculations, reducing the risk of invoices landing in the wrong tax period and improving the accuracy of printed invoices.
Original PR description
Previously, l10n_sa_confirmation_datetime was automatically set when invoices were confirmed, causing issues when users needed to backdate invoices. This created mismatches between Odoo's invoice date recognition and ZATCA's VAT liability calculation, forcing invoices into wrong tax return periods. Changes: - Expose l10n_sa_confirmation_datetime as "Issue Date" in form view - Allow manual setting of l10n_sa_confirmation_datetime before invoice confirmation - Preserve original Issue Date for rejected Phase 2 invoices (400 errors) - Hide Invoice Date field but sync it with Issue Date - Update PDF to display Issue Date instead of Invoice Date - Remove footer date from PDF - Extend future date validation to include Issue Date task-5009969 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236865 Forward-Port-Of: odoo/odoo#229517