How to use the openupgradelib.openupgrade.map_values function in openupgradelib

To help you get started, we’ve selected a few openupgradelib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OCA / timesheet / hr_timesheet_sheet / migrations / 13.0.1.0.0 / post-migration.py View on Github external
def res_company_sheet_range_map_values(env):
    openupgrade.map_values(
        env.cr,
        openupgrade.get_legacy_name("sheet_range"),
        "sheet_range",
        [(MONTHLY, "MONTHLY"), (WEEKLY, "WEEKLY"), (DAILY, "DAILY")],
        table="res_company",
    )