odoo/enterprise#77449
Created by fw-bot
            Merged
                at 438115ce87e7a070982235c72808e88d78df9f2e
            
                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:18.0-17.0-OPW-4183097-scraps_missing_in_cost_analysis-kdeb-DeMV-fw
- head
- 6399f94203d452aa079af0cafd8a67afdf47276a
- 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