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

[FIX] mrp: display byproducts values correctly in bom structure report

Stpes to reproduce the bug:
- Install mrp_plm
- Enable by-product option in the mrp settings
- Create a storable product P1 with BoM:
    - Type: manufacture
    - Component: C1
    - By-product: P2
    - save
- Click on the “Structure & cost” button
- Unfold the By-Products section

Problem:
Columns of the byproducts values are placed wrong, because it lacks
two empty <td/> which should be added normally here:
https://github.com/odoo/odoo/blob/10c6f4e8379c4c9c4084dd55d4d7bf1c34524d50/addons/mrp/report/mrp_report_bom_structure.xml#L233-L235

But 'extra_column_count' has a value of 0, so no empty <td/> is added

Solution:
The `_get_extra_column_count` function should be called in the
`get_by_products` function so that the value is set to 2 instead of 0:
https://github.com/odoo/enterprise/blob/26e3c4718ac2baae61ae2c5950adb4cb2251b507/mrp_plm/report/mrp_report_bom_structure.py#L41-L42



opw-3025823

closes odoo/odoo#106001

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent 1e436c23
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