Sunday, August 31, 2025
2 changes · 18.0
New functionality added to Odoo
This pull request adds a new base territory module to help organize contact-related geographic information such as regions, districts, branches, and territories. This can support better contact segmentation and business location management across the system.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes a Mexican e-invoicing issue where sales orders could show zero invoiced quantity after a CFDI invoice cancellation workflow. The system now refreshes the invoiced quantity when the CFDI status changes, keeping sales order information accurate for follow-up billing and reporting.
Original PR description
How to reproduce the issue: In l10n_mx: 1. Create a sale order. 2. Create an invoice from the SO, with yesterday’s date, and send it to the CFDI. 3. Lock the period at yesterday’s date. 4. Request the invoice cancellation with the “01” method. This creates a new invoice — confirm it. 5. Create a credit note for the original invoice. 6. Retry sending the cancel request to the CFDI; the CFDI state is now cancelled for the original invoice. On the original SO, the quantity invoiced is 0 despite the CFDI state of the original invoice being cancelled. This commit forces a recompute of the quantity invoiced when the CFDI state changes. Since _compute_qty_invoiced uses _get_invoice_lines, which filters out invoices in sent state, only lines from invoices in cancelled state will be taken into account. opw-4910139 Forward-Port-Of: odoo/enterprise#91924