<commit_before><commit_msg>[ADD] l10n_br_sale migration script<commit_after># Copyright (C) 2021 - TODAY <NAME> - Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade

_columns_rename = {
    'sale_order': [
        ('amount_gross', 'amount_price_gross'),
    ],
}


@openupgrade.migrate(use_env=True)
def migrate(env, version):
    for table in _columns_rename.keys():
        for rename_column in _columns_rename[table]:
            if openupgrade.column_exists(env.cr, table, rename_column[0]):
                openupgrade.rename_columns(
                    env.cr, {table: [rename_column]})
{'fraction_non_alphanumeric': 0.12272727272727273, 'fraction_numerical': 0.013636363636363636, 'mean_word_length': 3.436241610738255, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, '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': '4734525', 'n_tokens_mistral': 232, 'n_tokens_neox': 216, 'n_words': 43}