odoo/enterprise#77539
Created by fw-bot
            Merged
                at d53e31c04acf5d47d35e4c9e8265e99d1b452e72
            
                Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- 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 0s)
- label
- odoo-dev:master-17.0-OPW-4183097-scraps_missing_in_cost_analysis-kdeb-sO6p-fw
- head
- fb997514a8fd5c54b9afb25b0513a6f9b4ac06f3
- 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