Skip to content
Snippets Groups Projects
Commit 4a4f92c5 authored by Adrien Widart (awt)'s avatar Adrien Widart (awt)
Browse files

[FIX] mrp: prevent bom cycle

To reproduce the issue:
1. Create two products A, B
2. Create two BoMs:
   - Product: A
     - Component: B
   - Product: B
     - Component: A
3. On one BoM, open the report "Structure & Cost"

Error: an Odoo Server Error is raised: "[...] maximum recursion
depth exceeded while calling a Python object"

The error occurs because of the cycle between both BoMs. There is
already a check for that in `:MrpBom.explode`:
https://github.com/odoo/odoo/blob/2a73890d304476833d76bac9a36ef92f12f267a3/addons/mrp/models/mrp_bom.py#L329


But it's too late in the flow. We should not be able to configure
such BoMs.

OPW-3200969

closes odoo/odoo#132477

Signed-off-by: default avatarAdrien Widart (awt) <awt@odoo.com>
parent b2c0944d
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment