How to use the openupgradelib.openupgrade.copy_columns 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 eneldoserrata / marcos_community_addons / aa_modules_backup / account_invoice_currency / migrations / 9.0.1.0.0 / pre-migrate.py View on Github external
def migrate(cr, version):
    openupgrade.rename_columns(cr, column_renames)
    openupgrade.copy_columns(cr, column_copies)
github ForgeFlow / stock-rma / rma / pre_init_hook.py View on Github external
def pre_init_hook(cr):
    env = Environment(cr, SUPERUSER_ID, {})
    if not openupgrade.table_exists(env.cr, 'rma_order'):
        openupgrade.copy_columns(env.cr, column_copies)
        openupgrade.rename_columns(env.cr, column_renames)
        openupgrade.rename_tables(env.cr, _table_renames)
        assign_status(env.cr)
        set_default_values(env.cr)