Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 18
12285
2
thg 12 24
4470
1
thg 11 24
3238
2
thg 4 23
18266
1
thg 3 23
2478