Merge PR #902 into 16.0

Signed-off-by yajo
This commit is contained in:
OCA-git-bot
2024-07-22 07:46:45 +00:00

View File

@@ -8,7 +8,9 @@ from odoo.tools.sql import column_exists
@openupgrade.migrate()
def migrate(env, version):
if not column_exists(env.cr, "base_comment_template", "models"):
if openupgrade.table_exists(
env.cr, "base_comment_template_ir_model_rel"
) and not column_exists(env.cr, "base_comment_template", "models"):
openupgrade.logged_query(
env.cr,
"ALTER TABLE base_comment_template ADD COLUMN IF NOT EXISTS models text",