Skip to Content
Menú
This question has been flagged
3 Respostes
10425 Vistes

I want to show alert message by JavaScript file when click on a button, which is added in XML. I try a lot by different methods but didn't reached to any solution. So, anyone can solve this problem.
My XML Code is here.

Xml Code:

<button name = "name"  type="button" onclick="updatebtn" class="btn"/>
Avatar
Descartar
Autor Best Answer

Hii Raaj,

It's working for form view in xml file, but i want that this alert message pop-up by javascript file when click on "My Button". Thanks for support.

Avatar
Descartar
Best Answer

HI Pawan, I am not sure about JS alert message for Odoo form view button,as we can provide JS alert for Odoo templates button, but you can use confirm attribute to you button to show any warning message,but it won't stop you to proceed further.

Syntax : <button name="button_name"  string="My Button"  type="object" confirm="Are you sure you want to Proceed?"/>

Avatar
Descartar
Best Answer

Hi! Have you found any solution?

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
d’ag. 24
6178
1
d’oct. 22
23901
2
de set. 21
12564
1
d’ag. 21
8176
1
de jul. 21
4239