Skip to content

Commit

Permalink
[FIX] l10n_it_account_stamp: migration script for stamp lines
Browse files Browse the repository at this point in the history
  • Loading branch information
primes2h committed Feb 4, 2025
1 parent ea8d2f5 commit 297cf1b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions l10n_it_account_stamp/migrations/14.0.1.0.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2025 Sergio Zanchetta
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(
env.cr,
"""
UPDATE account_move_line aml
SET
is_stamp_line = True
FROM account_move am
WHERE
aml.move_id = am.id AND
tax_stamp = True AND
aml.invoice_id is NULL AND
aml.display_type is NULL;
""",
)

0 comments on commit 297cf1b

Please sign in to comment.