[14.0][IMP] product_configurator_mrp (Set BoM Sequences) #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.