Skip to content
Snippets Groups Projects
post-migration.py 582 B
Newer Older
  • Learn to ignore specific revisions
  • # © 2022 Le Filament (<http://www.le-filament.com>)
    # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
    
    from openupgradelib import openupgrade  # pylint: disable=W7936
    
    
    def scop_liasse_fiscale_map_values(env):
        openupgrade.map_values(
            env.cr,
            openupgrade.get_legacy_name("year"),
            "scop_cotisation",
            [
                (2020, "2020"),
                (2021, "2021"),
                (2022, "2022"),
            ],
            table="scop_cotisation",
        )
    
    
    @openupgrade.migrate()
    def migrate(env, version):
        scop_liasse_fiscale_map_values(env)