Monday, July 29, 2024
2 changes · saas-17.1
Resolved issues and error corrections
Sales reports now include down payment lines when calculating untaxed amounts to invoice and already invoiced. This makes sales reporting more accurate for orders that use down payments, helping teams avoid understated figures in reporting views.
Original PR description
### Steps to reproduce the issue: 1. Create a Sales Order 2. Create an Invoice with a Down Payment 3. Go to Sales>Reporting>Sales in Pivot View 4. Activate "Untaxed Amount To Invoice" or "Untaxed Amount Invoiced" in the Measures 5. Look for the Sales Order 6. The Down Payment is not calculated ### Explanation: In commit odoo/odoo@9aa52dd6418e5881adc2d96d15d062b55d6150c5, the Down Payment product was removed and Down Payment lines no longer have a `product_id`. In `sale.report`, most values are only calculated if this field, `product_id`, has a value. This includes `untaxed_amount_to_invoice` and `untaxed_amount_invoiced`. ### Fix reasoning: `is_downpayment` field filters Down Payment lines, it can be used to add them in the calculation of selected columns in the report. opw-4033003
This fix prevents manually adjusted component quantities from being overwritten when marking items as consumed in a manufacturing order. It helps manufacturers keep accurate consumption records when changes are made through detailed operations.
Original PR description
Backport of [1] The commit says: > The issue does not appear in 17.0 because, thanks to commit [5bb0f96](https://github.com/odoo/odoo/commit/5bb0f96f1973fa7e19b6701944b4a29577f3314f): The…
Backport of [1] The commit says: > The issue does not appear in 17.0 because, thanks to commit [5bb0f96](https://github.com/odoo/odoo/commit/5bb0f96f1973fa7e19b6701944b4a29577f3314f): The `manual_consumption` field of the stock moves related to a manufacturing order is set to be True as soon as the quantity is changed because of these lines: https://github.com/odoo/odoo/blob/9a11717c17b860ec2f1b2e228517c0d3945c474a/addons/mrp/static/src/widgets/mrp_consumed.js#L25-L27 But, if the user changes that quantity through the detailed operations, nothing will write on `manual_consumption`. As a result, the user then ticks the _Consumed_ box, sets a producing qty and... The bug is back: the consumed qty of the components will be updated. In the above use case, if [1] is applied, when the user ticks the box, it will trigger the onchange and flag `manual_consumption`. [1] https://github.com/odoo/odoo/commit/8aa7800fdf52b765b2b08b33aed1b963ff141401 forward port of commit 68f981d OPW-4048258 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr