Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][BUG] mrp_multi_level: using wrong variant BOM #1366

Closed
matt454357 opened this issue Oct 17, 2024 · 2 comments · Fixed by #1387
Closed

[16.0][BUG] mrp_multi_level: using wrong variant BOM #1366

matt454357 opened this issue Oct 17, 2024 · 2 comments · Fixed by #1387
Labels

Comments

@matt454357
Copy link
Contributor

Version 16.0 module mrp_multi_level is using the wrong variant BOM, when multiple variant BOMs exist.

This code should look for a variant specific BOM:

boms = product_mrp_area_id.product_id.bom_ids.filtered(
lambda x: x.type in ["normal", "phantom"]
)

To Reproduce

Add attribute "Legs" and values "Steel" and "Aluminum" on product FP-2:

Screenshot at 2024-10-16 18-37-06

Create BOMs for the two variants as follows:

Screenshot at 2024-10-16 18-32-09

Screenshot at 2024-10-16 18-32-38

Create outbound move for product FP-2 (Aluminum):

Screenshot at 2024-10-16 18-42-28

We expect a planned order for SF-2, but we get a planned order for SF-1:

Screenshot at 2024-10-16 18-35-28

@matt454357 matt454357 added the bug label Oct 17, 2024
@matt454357
Copy link
Contributor Author

The OCA module product_configurator_mrp has been creating individual BOMs for each variant since version 13.0.

https://github.com/OCA/product-configurator/tree/14.0/product_configurator_mrp

So, while the current method of selecting a BOM works with the core odoo demo data, it does not work with the OCA product configurator.

matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Oct 21, 2024
fixes OCA#1366

Start by getting two BOMs:

- Lowest sequence variant BOM
- Lowest sequence template-only BOM (no product_id)

Of these two, use the one with the lowest sequence
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Oct 21, 2024
fixes OCA#1366

Start by getting two BOMs:

- Lowest sequence variant BOM
- Lowest sequence template-only BOM (no product_id)

Of these two, use the one with the lowest sequence
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Nov 1, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template-only BOM (no product_id).
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Nov 1, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template-only BOM (no product_id).
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Nov 2, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Nov 4, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
matt454357 added a commit to asphaltzipper/manufacture that referenced this issue Nov 5, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
LoisRForgeFlow pushed a commit to ForgeFlow/manufacture that referenced this issue Nov 8, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
LoisRForgeFlow pushed a commit to ForgeFlow/manufacture that referenced this issue Nov 8, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
@LoisRForgeFlow
Copy link
Contributor

Solved via #1369

JasminSForgeFlow pushed a commit to ForgeFlow/manufacture that referenced this issue Dec 3, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
JasminSForgeFlow pushed a commit to ForgeFlow/manufacture that referenced this issue Dec 4, 2024
fixes OCA#1366

Using the _bom_find() method, we get the BOM with lowest sequence, whether it's a variant
BOM or a template BOM (no product_id).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants