Skip to content
Snippets Groups Projects
Commit 6ff32f4d 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#80509

X-original-commit: dcd3de94
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
parent 4bdf26d4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment