-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
[13.0][ADD] Add helper functions that make the migration of tax tags for localizations modules l10n_* a lot easier. #286
[13.0][ADD] Add helper functions that make the migration of tax tags for localizations modules l10n_* a lot easier. #286
Conversation
98c8f56
to
1ce0eac
Compare
openupgradelib/openupgrade_130.py
Outdated
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
"""Tools specific for migrating from Odoo 12.0 to 13.0. | ||
""" |
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.
No need to put this on a new line.
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.
Corrected.
openupgradelib/openupgrade_130.py
Outdated
from . import openupgrade | ||
|
||
_logger = logging.getLogger('OpenUpgrade') | ||
_logger.setLevel(logging.DEBUG) |
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.
Don't do this. Should be set from configuration. If messages are important enough that by default you want to show them, make them info messages.
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.
Alright, I removed the line.
…calizations modules l10n_* a lot easier.
1ce0eac
to
f316619
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.
👍 LGTM and working in practice
@ddejong-therp can this be merged already? I'm in the middle of a Odoo 12 to 13 migration and I get the following error now: |
I really hope it would get merged a.s.a.p., I've PR'ed some changes to openupgrade that depend on this. I think I added a warning to that PR that it depended on this. Nevertheless, it got merged before this PR. However, since you need this as well, maybe you could test this PR for you own DB. I think if just one more person would review it, it would get merged. |
Merging because it is used in OCA/OpenUpgrade#3184. |
SELECT res_id FROM ir_model_data | ||
WHERE | ||
model = 'account.account.tag' AND | ||
module = 'l10n_nl' AND |
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.
l10n_nl?
SELECT res_id FROM ir_model_data | ||
WHERE | ||
model = 'account.account.tag' AND | ||
module = 'l10n_nl' AND |
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.
l10n_nl?
SELECT res_id FROM ir_model_data | ||
WHERE | ||
model = 'account.account.tag' AND | ||
module = 'l10n_nl' AND |
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.
l10n_nl?
SELECT res_id FROM ir_model_data | ||
WHERE | ||
model = 'account.account.tag' AND | ||
module = 'l10n_nl' AND |
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.
l10n_nl?
Oh dear, will fix it asap! |
I'm using these functions in the migration script I'm going to create a pull request for l10n_nl for, but they should be useful for any localization module. Especially the
unlink_invalid_tax_tags_from_*
functions. When migrating theaccount
module from 12 to 13, the tax tags are structured differently; they are assigned to account.tax.repartition.line instead of accoun.tax itself. However, theaccount
module copies each tag to each new repartition line that it /could possibly/ belong to. This causes issues in the migrated instance in 13.0 and beyond.I'm using these functions here: OCA/OpenUpgrade#3184