-
-
Notifications
You must be signed in to change notification settings - Fork 265
[14.0][FIX] purchase_operating_unit: create PO with warehouse without OU #820
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
Conversation
This commit fixes an issue where, if there is only one warehouse visible to the user and that warehouse has no Operating Unit (so it's available for all regardless of OU), PO creation fails with an error. In case of multiple warehouses being available (with and without OUs) the one with the OU is preferred and used over the others.
francesco-ooops
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional ok!
|
@aleuffre Typically there is no warehouse without operating unit in the company and I think the OU should be mandatory in the warehouse. But being the code in stock_operating_unit as it is, I am ok with this improvement. Would you do the forward port when merged? |
|
@AaronHForgeFlow Thank you for reviewing this. Of course I will do the forward ports. |
|
/ocabot merge patch |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at f328a80. Thanks a lot for contributing to OCA. ❤️ |
|
I checked, and the I'll do a quick functional check to see if the problem exists in higher versions, but it may be that forward porting is not even needed. |
|
Yes, |
|
ok, thank you for checking. There is a purchase_stock_operating_unit module, but looking at the code it seems it does not have this issue. |
This commit fixes an issue where, if there is only one warehouse visible to the user and that warehouse has no Operating Unit (so it's available for all regardless of OU), PO creation fails with an error.
In case of multiple warehouses being available (with and without OUs) the one with the OU is preferred and used over the others.