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

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"/>
الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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.

الصورة الرمزية
إهمال
أفضل إجابة

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?"/>

الصورة الرمزية
إهمال
أفضل إجابة

Hi! Have you found any solution?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 24
6181
1
أكتوبر 22
23903
2
سبتمبر 21
12568
1
أغسطس 21
8178
1
يوليو 21
4239