Saturday, March 29, 2025
2 changes · saas-17.4
Miscellaneous changes
Currently, an error can occur in `_find_matching_po_and_inv_lines` when some invoice lines have a price_unit of 0. This happens because the matching logic sorts and matches lines by `(price_unit, qty)`, leading to "Journal Items" (`line_ids`) being incorrectly matched with purchase order lines. The issue arises because the `_find_matching_po_and_inv_lines` function checks all `line_ids`, instead of only `invoice_line_ids`. When a PO line has a price_unit of 0, it might match with a line that
Original PR description
Currently, an error can occur in `_find_matching_po_and_inv_lines` when some invoice lines have a price_unit of 0. This happens because the matching logic sorts and matches lines by `(price_unit,…
Currently, an error can occur in `_find_matching_po_and_inv_lines` when some invoice lines have a price_unit of 0. This happens because the matching logic sorts and matches lines by `(price_unit, qty)`, leading to "Journal Items" (`line_ids`) being incorrectly matched with purchase order lines. The issue arises because the `_find_matching_po_and_inv_lines` function checks all `line_ids`, instead of only `invoice_line_ids`. When a PO line has a price_unit of 0, it might match with a line that isn't an actual invoice line. As a result, `unmatched_lines` becomes incorrect, and it could remove a valid invoice line. Then, later, when calculating `inv_and_po_lines`, the process only considers `invoice_line_ids`. Since no matching line is found, an error occurs when attempting to delete the line (id is False). Steps to reproduce: 1. Create a purchase order with: - 1 product A with price_unit = 0 2. Confirm the purchase order. 3. Upload an EDI XML bill (e.g., IT localization) with: - A reference to the purchase order - 1 product B with price_unit = 100 Since all bill lines are processed, a tax line or a payment term line might incorrectly match with the PO line, causing the error. opw-4513869 Forward-Port-Of: odoo/odoo#197637
With the new LIPE export, posting a closing entry opens an export wizard which breaks some tests. This PR implements a workaround to not open that wizard. --- Community PR: https://github.com/odoo/odoo/pull/195948 task-4507942 Forward-Port-Of: odoo/enterprise#80009
Original PR description
With the new LIPE export, posting a closing entry opens an export wizard which breaks some tests. This PR implements a workaround to not open that wizard. --- Community PR: https://github.com/odoo/odoo/pull/195948 task-4507942 Forward-Port-Of: odoo/enterprise#80009