OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
298 stars 739 forks source link

[13.0] account_spread_cost_revenue migration: incorrect table name for column rename. #1877

Open niecw opened 1 month ago

niecw commented 1 month ago

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.