Friday, March 14, 2025
2 changes · 17.0
Enhancements to existing features
Users can now download the XML for Jordanian e-invoices that fail submission to JoFotara, making it easier to investigate and resolve issues. The change also protects PDFs for successfully submitted invoices from being deleted, preserving important invoice records.
Original PR description
This commit gives the users access to the XML of an invoice whose submission to JoFotara failed. This allows for better debugging of failed invoices. It also prevents the users from deleting PDFs of successfully submitted invoices. task-4571479 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customer follow-up screens now check unpaid invoices much more efficiently by collecting the needed data in one pass instead of repeating the same lookup for each customer. This reduces wait times and database load, especially when reviewing many customers at once.
Original PR description
Before this PR the function _compute_unpaid_invoices is using an antipattern of running a search in a for loop. This PR performs a single search and uses a python dictionary for faster lookup in the forloop and fewer queries. Benchmarks: |num res.partner | time before | no. queries| time after | no. queries after| |-----|-----|----|------|----| | 80 | ~18s | 80 | ~0.4s | 1|