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

I want to use javascript eval function on float and integer input fields. For example in sale order, I want to calculate any product quantity like "2*6" I used my own jquery but id doesn't work, it seems odoo ignores it. Is there a way to do it? Thanks.

$(document).ready(function(){
  $('input[name=product_uom_qty]').change(function(e){                
    $(this).val(eval($(this).val()));
  })
});
الصورة الرمزية
إهمال
أفضل إجابة

Please change event to onclick on add more. Because input is disabled.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يوليو 25
228
0
يونيو 25
447
1
يونيو 25
694
1
يونيو 25
726
1
مايو 25
1265