-
-
Notifications
You must be signed in to change notification settings - Fork 702
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] product_uom_measure_type: Fixed the issue, that the module cannot be installed #1778 #1779
[FIX] product_uom_measure_type: Fixed the issue, that the module cannot be installed #1778 #1779
Conversation
Hi @legalsylvain, |
…ot be installed on migrated databases which already have a column 'measure_type'
ba7e21c
to
c9eec75
Compare
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.
Hi. thanks for fixing that issue !
note : The implementation is correct, but I wonder if it's not better to test if the column exist, and if yes, return and doesn't execute code. if avoids all the UPDATE records that are, I guess useless if the column still exists.
What do you think ?
Kind regards.
Hi @legalsylvain, thank you for the quick feedback! I think we still need to run the update queries. The reason is, that after 13.0 at leaset two new uom categories got introduced: uom_categ_wtime and uom_categ_surface All three update functions are actually build on top of each other
Technically we could reduce the update to only handle the new uom categories, in case the column measure_type already exists. This would increase the complexity of the hook a lot, though. Since the update functions do not really hurt and are also uncritical regarding performance, I would rather keep it simple. |
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.
Thanks a lot for your explanation !
/ocabot merge patch
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 30eec92. Thanks a lot for contributing to OCA. ❤️ |
[FIX] product_uom_measure_type: Fixed the issue, that the module cannot be installed on migrated databases which already have a column 'measure_type'
This pr fixed #1778
@dreispt @legalsylvain @rousseldenis
Kindly ask to check this pr :)