Skip to content
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-l10n_it_account_stamp. Changed env to cr in arguments of def migrate for error in upgrade to v18 #4585

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions l10n_it_account_stamp/migrations/18.0.1.0.0/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@


@openupgrade.migrate()
def migrate(env, version):
def migrate(cr, version):
openupgrade.load_data(
env.cr, "l10n_it_account_stamp", "18.0.1.0.0/noupdate_changes.xml"
cr, "l10n_it_account_stamp", "18.0.1.0.0/noupdate_changes.xml"
)
openupgrade.delete_record_translations(
env.cr, "l10n_it_account_stamp", ["l10n_it_account_stamp_2_euro"]
cr, "l10n_it_account_stamp", ["l10n_it_account_stamp_2_euro"]
)
5 changes: 4 additions & 1 deletion l10n_it_account_stamp/migrations/18.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from openupgradelib import openupgrade

from odoo import SUPERUSER_ID, api


def _rename_fields(env):
openupgrade.rename_fields(
Expand Down Expand Up @@ -73,5 +75,6 @@ def _rename_fields(env):


@openupgrade.migrate()
def migrate(env, version):
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
_rename_fields(env)
Loading