mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX] base_comment_template: Make field truly company dependent
Previous field declaration was incorrect due to a typo, leading to non applying the company dependent features. Now everything is correct and the migration scripts care of moving data properly.
This commit is contained in:
committed by
Pierre Verkest
parent
88e7627b11
commit
9b738976fe
13
base_comment_template/migrations/12.0.3.0.0/pre-migration.py
Normal file
13
base_comment_template/migrations/12.0.3.0.0/pre-migration.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2020 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
cr = env.cr
|
||||
table = 'res_partner'
|
||||
old_column = 'property_comment_template_id'
|
||||
new_column = openupgrade.get_legacy_name(old_column)
|
||||
if openupgrade.column_exists(cr, table, old_column):
|
||||
openupgrade.rename_columns(cr, {table: [(old_column, new_column)]})
|
||||
Reference in New Issue
Block a user