[FIX]crm_partner_assign: set probabilities of stages 'Assigned' and 'To recycle'...
[odoo/odoo.git] / openerp / exceptions.py
index fbf52c7..7789345 100644 (file)
@@ -25,11 +25,22 @@ This module defines a few exception types. Those types are understood by the
 RPC layer. Any other exception type bubbling until the RPC layer will be
 treated as a 'Server error'.
 
+If you consider introducing new exceptions, check out the test_exceptions addon.
 """
 
 class Warning(Exception):
     pass
 
+class RedirectWarning(Exception):
+    """ Warning with a possibility to redirect the user instead of simply
+    diplaying the warning message.
+
+    Should receive as parameters:
+      :param int action_id: id of the action where to perform the redirection
+      :param string button_text: text to put on the button that will trigger
+          the redirection.
+    """
+
 class AccessDenied(Exception):
     """ Login/password error. No message, no traceback. """
     def __init__(self):