From f468503c88234adf026830fd653cec861aa17144 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 27 Nov 2023 09:15:21 +0100 Subject: [PATCH] [OU-FIX] account_check_printing: Proper SQL string The formatting should be done regularly, or the value that will be used will be literally `openupgrade_legacy_13_0_check_number`. TT46186 --- .../migrations/13.0.1.0/post-migration.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/account_check_printing/migrations/13.0.1.0/post-migration.py b/addons/account_check_printing/migrations/13.0.1.0/post-migration.py index b90e6aa7ba04..aa5494abf061 100644 --- a/addons/account_check_printing/migrations/13.0.1.0/post-migration.py +++ b/addons/account_check_printing/migrations/13.0.1.0/post-migration.py @@ -8,10 +8,12 @@ def map_account_payment_check_number(env): openupgrade.logged_query( env.cr, """ UPDATE account_payment - SET check_number = '' || %s + SET check_number = %s::VARCHAR WHERE %s IS NOT NULL - """, (openupgrade.get_legacy_name('check_number'), - openupgrade.get_legacy_name('check_number')) + """ % ( + openupgrade.get_legacy_name('check_number'), + openupgrade.get_legacy_name('check_number') + ) )