[14.0][OU-FIX] uom: setting reference unit
Some of the noupdate_changes imply to set the uom_type as "reference". Given that there can be only one reference unit per uom_category, forcing some uom.uom to be the reference of their category fails if the reference unit has been changed by the customer.
As an example, I have a customer who changed the volume reference unit to be 0.5 L instead of 1 L. Therefore this openupgrade script fail to apply the 1 L as a reference unit for the volume category.
If the database does not contain any reference unit for a unit category, then, this should be fixed before migrating the data. Changing the reference unit during migration does not seams a good idea to me.
Hi @MiquelRForgeFlow, @pedrobaeza, @StefanRijnhart, some modules you are maintaining are being modified, check this out!
Agreed! The uom type is and was already kept in sync with the factor, and in 14.0 uom_type reference replaces factor 1.0 in this data.
Instead of removing the lines, please <!--comment--> them out so that they are not silently reintroduced if someone proposes a new analysis.
@StefanRijnhart Thanks for your review. I commented the line out instead of removing it.
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
/ocabot merge nobump
This PR looks fantastic, let's merge it! Prepared branch 14.0-ocabot-merge-pr-4479-by-legalsylvain-bump-nobump, awaiting test results.
Congratulations, your PR was merged at 7af14f7e6d662acd0174bf237fe4cfd9040e436e. Thanks a lot for contributing to OCA. ❤️