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

[FIX] sale_order_product_recommendation: make UoM work #2955

Conversation

yajo
Copy link
Member

@yajo yajo commented Feb 15, 2024

Before this patch, UoM wasn't being properly inherited into generated lines when those lines didn't exist previously in the SO:

image

Also, changing it manually didn't work as expected in that same case.

This is because the UoM was related to the SOL UoM. But if there was no SOL, it did nothing.

Now it's properly computed. UoM comes from the product if there's no SOL or it can't provide it. The user can change it to other UoM of the same category. The change is propagated when applying the wizard, both when creating lines and updating them. Tests added.

@moduon MT-4472

@yajo yajo self-assigned this Feb 15, 2024
@yajo yajo added the bug label Feb 15, 2024
@OCA-git-bot
Copy link
Contributor

Hi @sergio-teruel, @rafaelbn,
some modules you are maintaining are being modified, check this out!

@yajo yajo added this to the 16.0 milestone Feb 15, 2024
Copy link

@fcvalgar fcvalgar left a comment

Choose a reason for hiding this comment

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

Functional review,

LGTM thank you @yajo

image

image

Before this patch, UoM wasn't being properly inherited into generated lines when those lines didn't exist previously in the SO.

Also, changing it manually didn't work as expected in that same case.

This is because the UoM was related to the SOL UoM. But if there was no SOL, it did nothing.

Now it's properly computed. UoM comes from the product if there's no SOL or it can't provide it. The user can change it to other UoM of the same category. The change is propagated when applying the wizard, both when creating lines and updating them. Tests added.

@moduon MT-4472
@yajo yajo force-pushed the 16.0-sale_order_product_recommendation-fix_missing_uom branch from 021283c to 7f2c14f Compare February 15, 2024 12:19
Copy link
Contributor

@Shide Shide left a comment

Choose a reason for hiding this comment

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

Code and Functional review

Copy link
Contributor

@Gelojr Gelojr left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2955-by-rafaelbn-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 03cb985 into OCA:16.0 Feb 15, 2024
9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fe1ffdc. Thanks a lot for contributing to OCA. ❤️

@yajo yajo deleted the 16.0-sale_order_product_recommendation-fix_missing_uom branch February 16, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants