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

[14.0][IMP] product_configurator_mrp (Set BoM Sequences) #1

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

bcbrakelOSI
Copy link

This fix is originally by Patrick Wilson. As this is not a fork from the OCA repo I had to copy and paste the code on this new branch to apply it. Please refer to his commit/PR in the OCA repo and his original description of the change below:

OCA#80

Sets sequences on the BoM so proper BoM is used on the MO.
When the variant is created by the configurator, so is it's BoM however the BoM sequences typically aren't set. So, when Odoo creates an MO, it looks through the BoM's of the related product template and uses the first one it finds either one with the product variant or without any variants.

If the main BoM (aka Master BoM) is found first, it will be used instead of the variant's BoM since it doesn't have a variant applied to it.

Setting the sequences and making the BoM's without variants have a high sequence resolves this issue.

@bcbrakelOSI
Copy link
Author

Also included the following commit/PR at Patrick's request:

OCA#79

This fixes an issue when a new variant is created, it creates the BoM with operations and steps, since it's copying the steps, the product on the steps gets set with the product template and not the new variant. So, when an MO is created for the variant, the work order steps don't show, because they don't apply to the variant. The change is to simply set the product on the step to the new variant.

Copy link

@patrickrwilson patrickrwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dreispt
Copy link
Collaborator

dreispt commented Feb 2, 2024

@patrickrwilson @bcbrakelOSI I'm sorry I believe you made the PR to the wrong repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants