Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4246 Lượt xem

in my RML report, i got an error when my query doesn't found any record.

SyntaxError: JSON.parse: unexpected end of data at line 2 column 1 of the JSON data

a message appear only in my terminal.

How can I display an error message on browser ??

Thank You


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I resolved this by overriding create method, i put search method to get my record, if i found nothing i handle with osv.except_osv.

This method passed before RML search Query, so it works !

Ảnh đại diện
Huỷ bỏ