diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py index 5197cba9eb..11c875a79a 100644 --- a/trytond/protocols/dispatcher.py +++ b/trytond/protocols/dispatcher.py @@ -112,7 +112,7 @@ def dispatch(host, port, protocol, database_name, user, session, object_type, pool.init() obj = pool.get(object_name, type=object_type) if method not in obj._rpc: - raise Exception('Calling method %s on ' \ + raise Exception('UserError', 'Calling method %s on ' \ '%s %s is not allowed!' % \ (method, object_type, object_name))