13.0: Run migration to v13.0 the following error log will occur:
INFO XXXX odoo.modules.migration: module account_spread_cost_revenue: Running migration [>13.0.1.0.0] pre-migration
ERROR XXXX odoo.sql_db: bad query: ALTER TABLE "res_partner" RENAME COLUMN "auto_archive" TO "auto_archive_spread"
ERROR: column "auto_archive" does not exist
Expected behavior
The migration should run without error.
Module
account_spread_cost_revenue
Describe the bug
The table name mentioned in https://github.com/OCA/account-financial-tools/blob/2645ee865a61d6640a8733c7b5172de1868f85b7/account_spread_cost_revenue/migrations/13.0.1.0.0/pre-migration.py#L7 should be res_company instead of res_partner. c.q. https://github.com/OCA/account-financial-tools/blob/ed3382bc3502cd8db8a1bb5e54cbfd311d6ebe77/account_spread_cost_revenue/models/res_company.py#L30
To Reproduce
13.0: Run migration to v13.0 the following error log will occur: INFO XXXX odoo.modules.migration: module account_spread_cost_revenue: Running migration [>13.0.1.0.0] pre-migration ERROR XXXX odoo.sql_db: bad query: ALTER TABLE "res_partner" RENAME COLUMN "auto_archive" TO "auto_archive_spread" ERROR: column "auto_archive" does not exist
Expected behavior The migration should run without error.