コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3474 ビュー

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
7月 25
231
0
6月 25
454
1
6月 25
699
1
6月 25
727
1
5月 25
1273