OpenUpgrade icon indicating copy to clipboard operation
OpenUpgrade copied to clipboard

[14.0][OU-FIX] uom: setting reference unit

Open remytms opened this issue 1 year ago • 2 comments

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.

remytms avatar Jun 19 '24 15:06 remytms

Hi @MiquelRForgeFlow, @pedrobaeza, @StefanRijnhart, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar Jun 19 '24 15:06 OCA-git-bot

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 avatar Jun 19 '24 16:06 StefanRijnhart

@StefanRijnhart Thanks for your review. I commented the line out instead of removing it.

remytms avatar Sep 13 '24 11:09 remytms

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). 🤖

OCA-git-bot avatar Sep 13 '24 12:09 OCA-git-bot

/ocabot merge nobump

legalsylvain avatar Sep 13 '24 12:09 legalsylvain

This PR looks fantastic, let's merge it! Prepared branch 14.0-ocabot-merge-pr-4479-by-legalsylvain-bump-nobump, awaiting test results.

OCA-git-bot avatar Sep 13 '24 12:09 OCA-git-bot

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

OCA-git-bot avatar Sep 13 '24 12:09 OCA-git-bot