summaryrefslogtreecommitdiff
path: root/odoo/exceptions.py
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2017-08-01 10:36:34 +0200
committerJeremy Kersten <jke@odoo.com>2017-08-01 10:43:36 +0200
commit856f35eb216a82aa8afd086f54903f59c1e1f031 (patch)
treede2d4c43c6d91e1b5012b400cc9d41602a13389e /odoo/exceptions.py
parentabbb937607ea82a9c56cc328f6a0ca3430876948 (diff)
[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.
Diffstat (limited to 'odoo/exceptions.py')
-rw-r--r--odoo/exceptions.py2
1 files changed, 1 insertions, 1 deletions
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