odoo/enterprise#77451
Created by fw-bot
            Merged
                at dd3631ca29de23e25e11c05705624941e45d0369
            
                Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 1s)
- label
- odoo-dev:saas-18.1-17.0-OPW-4183097-scraps_missing_in_cost_analysis-kdeb-xgGX-fw
- head
- 443144fb53a2323d3357ca2de4b0e3308777df92
- merged
- 9 months ago by Bugfix, Kawtar Drissi El Bouzaidi (kdeb)
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| 17.0 | #188639 | #75221 | 
| saas-17.2 | #77438 | |
| saas-17.4 | #77444 | |
| 18.0 | #77449 | |
| saas-18.1 | #77451 | |
| saas-18.2 | ||
| saas-18.3 | ||
| saas-18.4 | ||
| 19.0 | ||
| master | #77539 | 
[FW][FIX] mrp_account_enterprise: use correct scrap qty field in Cost Analysis
Issue:
    In 17.0 and saas-17.2, The Cost of Scrap section does not appear
    in the the Cost Analysis Report despite having scrapped some components
    during manufacturing.
Steps to reproduce:
    1. Create a product with a BoM
    2. Manufacture the product
    3. Scrap some components during manufacturing
    4. print the Cost Analysis Report
    5. Notice the cost of scrap section does not appear in the report.
Solution:
- I added raw_material_production_id to the search criteria to ensure scrap stock moves linked to raw materials are also included.
- I replaced product_qty with the quantity field for handling scrap quantities.
opw-4183097
Forward-Port-Of: #75221