From ecd320031a6feb2808e4164e81449c3dfbb859d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Scarafia?= Date: Mon, 13 Nov 2023 21:23:10 -0300 Subject: [PATCH] [FIX] core.exceptions.UserError --> Warning The deprecated warning was removed on 17 (https://github.com/odoo/odoo/commit/d200dcfb2c912353d404312b9d9484846868cf96) --- openupgradelib/openupgrade.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openupgradelib/openupgrade.py b/openupgradelib/openupgrade.py index ece34af4..cae812e7 100644 --- a/openupgradelib/openupgrade.py +++ b/openupgradelib/openupgrade.py @@ -86,7 +86,10 @@ def __exit__(self, exc_type, exc_value, traceback): many2many = core.osv.fields.many2many one2many = core.osv.fields.one2many - WarningError = core.exceptions.Warning + if version_info[0] >= 17: + WarningError = core.exceptions.UserError + else: + WarningError = core.exceptions.Warning if version_info[0] >= 7: plaintext2html = tools.mail.plaintext2html if version_info[0] >= 8: