From 856f35eb216a82aa8afd086f54903f59c1e1f031 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Tue, 1 Aug 2017 10:36:34 +0200 Subject: [PATCH] [FIX] UserError: don't display None in Warning popup. UserError uses a retrocompatibility function 'except_orm' which one can take a second parameters. The default value of this second param is None, so if we don't force an empty string, we will see a None on each raise UserError as last line. --- odoo/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/exceptions.py b/odoo/exceptions.py index d83e350c624..edde12cb3ae 100644 --- a/odoo/exceptions.py +++ b/odoo/exceptions.py @@ -30,7 +30,7 @@ class except_orm(Exception): class UserError(except_orm): def __init__(self, msg): - super(UserError, self).__init__(msg) + super(UserError, self).__init__(msg, value='') # deprecated due to collision with builtins, kept for compatibility