mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 16:52:02 +02:00
17.0 vanilla
This commit is contained in:
parent
2e65bf056a
commit
df627a6bba
328 changed files with 578149 additions and 759311 deletions
|
|
@ -28,13 +28,6 @@ class UserError(Exception):
|
|||
"""
|
||||
super().__init__(message)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
warnings.warn(
|
||||
"UserError attribute 'name' is a deprecated alias to args[0]",
|
||||
DeprecationWarning)
|
||||
return self.args[0]
|
||||
|
||||
|
||||
class RedirectWarning(Exception):
|
||||
""" Warning with a possibility to redirect the user instead of simply
|
||||
|
|
@ -115,18 +108,3 @@ class ValidationError(UserError):
|
|||
|
||||
When you try to create a new user with a login which already exist in the db.
|
||||
"""
|
||||
|
||||
|
||||
# Deprecated exceptions, only kept for backward compatibility, may be
|
||||
# removed in the future *without* any further notice than the Deprecation
|
||||
# Warning.
|
||||
|
||||
class except_orm(UserError):
|
||||
def __init__(self, name, value=None):
|
||||
warnings.warn("except_orm is a deprecated alias to UserError.", DeprecationWarning)
|
||||
super().__init__(f"{name}: {value}")
|
||||
|
||||
class Warning(UserError):
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn("Warning is a deprecated alias to UserError.", DeprecationWarning)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue