Sunday, May 10, 2026
3 changes · saas-19.2
Enhancements to existing features
This update enhances the logging process during cloud storage migration, providing more detailed information about the progress and any potential issues. Previously, migration logs were limited, making it harder to troubleshoot problems. Now, the logs will be more informative, allowing our support team to quickly identify and resolve any challenges related to migrating data to the cloud.
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 Forward-Port-Of: odoo/odoo#263669 Forward-Port-Of: odoo/odoo#263557
Resolved issues and error corrections
This update resolves an issue where tax reports for Russian VAT (GSTR2B) displayed incorrect amounts due to a sign discrepancy with reverse charge transactions. Now, bills are shown with positive amounts and credit notes with negative amounts, ensuring accurate financial reporting.
Original PR description
In reverse charge taxes, tax tags are added on negative repartition lines, causing the amounts to appear with the opposite sign in reports. Due to this, credit notes were shown as positive amounts and bills as negative amounts. This commit fixes the sign handling so that: - bills are shown with positive amounts - credit notes are shown with negative amounts Forward-Port-Of: odoo/enterprise#116828 Forward-Port-Of: odoo/enterprise#116740
This update fixes an issue where the COGS calculation was incorrectly inflated when multiple lines of the same product were invoiced separately from a single Sale Order. The change ensures accurate COGS reporting by isolating COGS calculations to the specific invoice line, preventing overestimation of costs and maintaining accurate profitability reports. This improves the reliability of financial data.
Original PR description
### Issue: When a Sale Order has multiple lines for the same FIFO-costed product and each line is invoiced separately, the COGS posted on the second (and any subsequent) invoice is incorrectly…
### Issue: When a Sale Order has multiple lines for the same FIFO-costed product and each line is invoiced separately, the COGS posted on the second (and any subsequent) invoice is incorrectly inflated, causing the sale to appear less profitable or even at a loss in the accounting records. ### Steps to reproduce: 1. Set a product as storable with FIFO costing and real-time valuation. 2. Create a Sale Order with two lines for the same product at different prices. 3. Confirm the SO and validate the two deliveries (each consumes a different FIFO layer). 4. Invoice the first SO line and post the invoice. 5. Invoice the second SO line and post the invoice. 6. Observe that the COGS on the second invoice is higher than the actual cost of the stock move linked to that line. ### Root Cause: _get_cogs_qty() and _get_posted_cogs_value() in sale_stock filtered already-posted COGS lines by product_id. This caused them to aggregate quantities and values across ALL SO lines sharing the same product. However, _get_cogs_price_unit() derives the unit cost only from the current line's stock move. The mismatch results in: (unit_cost_of_line_2 * total_qty_of_both_lines) - cogs_already_posted ### Fix: Replace the product_id filter with a sale-line-scoped filter using cogs_origin_id. By checking cogs_origin_id.sale_line_ids & sale_lines, only COGS originating from the same SO line(s) as the current invoice line are considered, correctly isolating each line's COGS from the others. opw-6004810 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257868