Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
marrask. 18
12284
2
jouluk. 24
4470
1
marrask. 24
3235
2
huhtik. 23
18259
1
maalisk. 23
2477