Skip to content
Snippets Groups Projects
Commit dcd3de94 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] mrp: fix the qty in the BOM report


Steps to reproduce the bug:
 - Create a BOM:
    - Set the quantity of the finished product and component as more than 1
- Save > Go to BOM Structure & Cost > the quantity in the input is set on 3
- Print

Problem:
The report generated shows the qty and cost for production of 1 unit of product, regardless of the BOM quantity set in the input

The "_onClickPrint" function tries to get the quantity of the bom in the context,
but since the value of "this.given_context.searchQty" is null, the function will use the default value of 1.
The "searchQty" is only set in the "onchange", so we can manually trigger it when initiating the page so that the "searchQty" is set correctly

opw-2691632

closes odoo/odoo#80435

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent 7b5956dd
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment