تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
نوفمبر 18
12285
2
ديسمبر 24
4470
1
نوفمبر 24
3239
2
أبريل 23
18270
1
مارس 23
2479