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

Hi all,

in my xml 


<header>
<button onclick="myFunction()" name="click_me" string="Click"
class="oe_highlight"/>
</header>

and in my custom .js file 


function myFunction() {
alert("Hello! I am an alert box!!");
}

the javascript function called after i button pressed but the create/save buttons got disable like below 

https://prnt.sc/qyb8m9

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

The easy way fix is just use enable trick on your js

function myFunction() {
alert("Hello! I am an alert box!!");
//enable the button that is disabled for example save/cancel button ​$('.o_form_button_save').prop('disabled', false); // Enable Save button $('.o_form_button_cancel').prop('disabled', false); // Enable Cancel button
}
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 16
11261
1
أكتوبر 20
4760
2
يونيو 20
4472
5
ديسمبر 17
5822
3
يناير 24
16804