Skip to Content
Menu
Dette spørgsmål er blevet anmeldt

Hi All,
I was trying to override one of Odoo's exception classes in my custom module. Here is what i tried.

exception.py
     

from odoo.exceptions import ValidationError, except_orm
from odoo.http import request
print('-------am here-------------')
class ValidationError(ValidationError):
​def __init__(self, msg):
​print('print ValidationError------',msg)
​super(ValidationError, self).__init__(msg)

But still, the validation error gets called from the base class, not my custom class.

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
nov. 18
12296
2
dec. 24
4475
1
nov. 24
3250
2
apr. 23
18287
1
mar. 23
2481