2
0

[FIX]account_move_line_purchase_info: remove migration script older versions

This commit is contained in:
AaronHForgeFlow 2021-12-29 08:28:37 +01:00 committed by Andrea Stirpe
parent a484858560
commit b09e8b5058

View File

@ -1,26 +0,0 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
"""
Column `purchase_id` of table `account_move_line` has been renamed to `purchase_order_id`
because `purchase_order_id` is now in the core.
"""
old_purchase_column = "purchase_id"
new_purchase_column = "purchase_order_id"
if not openupgrade.column_exists(env.cr, "account_move_line", new_purchase_column):
openupgrade.rename_fields(
env,
[
(
"account.move.line",
"account_move_line",
old_purchase_column,
new_purchase_column,
),
],
)