跳至內容
選單
此問題已被標幟
1 回覆
3501 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 25
4811
0
7月 25
310
0
6月 25
519
1
6月 25
728
1
6月 25
752