Files
reporting-engine/base_comment_template/migrations/12.0.3.0.0/post-migration.py
Pedro M. Baeza 9b738976fe [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.
2021-01-26 16:00:00 +01:00

14 lines
509 B
Python

# 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):
table = 'res_partner'
old_column = 'property_comment_template_id'
new_column = openupgrade.get_legacy_name(old_column)
if openupgrade.column_exists(cr, table, new_column):
openupgrade.convert_to_company_dependent(
env, 'res.partner', old_column, new_column, 'res.partner')