-
-
Notifications
You must be signed in to change notification settings - Fork 700
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
[14.0][MIG] uom #2666
Merged
Merged
[14.0][MIG] uom #2666
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2021 ForgeFlow S.L. <https://www.forgeflow.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.load_data(env.cr, "uom", "14.0.1.0/noupdate_changes.xml") |
13 changes: 13 additions & 0 deletions
13
openupgrade_scripts/scripts/uom/14.0.1.0/upgrade_analysis_work.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
---Models in module 'uom'--- | ||
---Fields in module 'uom'--- | ||
uom / uom.category / measure_type (selection) : DEL selection_keys: ['length', 'unit', 'volume', 'weight', 'working_time'] | ||
# NOTHING TO DO: not used anymore, error when filled in v13. | ||
|
||
uom / uom.uom / measure_type (selection) : DEL selection_keys: function | ||
# NOTHING TO DO: It stored the measure type from uom.category, but not needed anymore. | ||
|
||
---XML records in module 'uom'--- | ||
NEW uom.uom: uom.product_uom_cubic_foot (noupdate) | ||
NEW uom.uom: uom.product_uom_cubic_inch (noupdate) | ||
NEW uom.uom: uom.product_uom_cubic_meter (noupdate) | ||
# NOTHING TO DO: (noupdate="1") Adds new imperial system volume units |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
violates _check_category_reference_uniqueness
https://github.com/OCA/OCB/blob/13.0/addons/uom/models/uom_uom.py#L83-L94
File "/home/gcapalbo/k240/migrate_therp/build-14.0/parts/odoo/addons/uom/models/uom_uom.py", line 85, in check_category_reference_uniqueness
raise ValidationError(("UoM category %s should only have one reference unit of measure.") % (self.env['uom.category'].browse(uom_data['category_id']).name,))
odoo.exceptions.ValidationError: UoM categorie Unitheeft slechts één referentie maateenheid.
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.
But this error doesn't have any relation with the rounding. This constrain already existed in v13, and your problem seems more a problem of your db data, which has something wrong and you should solve manually before migrating.