anand raj
anand raj

Reputation: 227

How to display a warning message using jQuery in odoo 9

I would like to show an warning message in odoo using jQuery. Because I am doing the validation in jQuery code.

Upvotes: 1

Views: 663

Answers (2)

Keval Mehta
Keval Mehta

Reputation: 664

You can use do_warn,do_notify kind of browser's notification method's for displaying error message or warning using jquery. Apart from that you can also use throw new Error kind of constructor.

Upvotes: 0

Kenly
Kenly

Reputation: 26768

You can use do_warn method odoo-9:FormView.load_record.

this.do_warn(_t("Form"), _t("The record could not be found in the database."), true);

Upvotes: 2

Related Questions