<commit_before># Copyright 2020 Tecnativa - <NAME>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade  # pylint: disable=W7936


@openupgrade.migrate()
def migrate(env, version):
    openupgrade.load_data(
        env.cr, "account_banking_mandate", "migrations/13.0.1.0.0/noupdate_changes.xml"
    )<commit_msg>[OU] account_banking_mandate: Transfer mandate in invoices<commit_after># Copyright 2020 Tecnativa - <NAME>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade  # pylint: disable=W7936


@openupgrade.migrate()
def migrate(env, version):
    openupgrade.load_data(
        env.cr, "account_banking_mandate", "migrations/13.0.1.0.0/noupdate_changes.xml"
    )
    openupgrade.logged_query(
        env.cr,
        """
        UPDATE account_move am
        SET mandate_id = ai.mandate_id
        FROM account_invoice ai
        WHERE ai.id = am.old_invoice_id""",
    )
{'fraction_non_alphanumeric': 0.11883182275931521, 'fraction_numerical': 0.032225579053373615, 'mean_word_length': 3.497737556561086, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '827629', 'n_tokens_mistral': 382, 'n_tokens_neox': 350, 'n_words': 67}