Skip to Content
Menu
This question has been flagged

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.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
lapkr. 18
12545
2
gruod. 24
4746
1
lapkr. 24
3555
2
bal. 23
18843
1
kov. 23
2732