跳至内容
菜单
此问题已终结
1 回复
3444 查看

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
6月 25
406
1
6月 25
673
1
6月 25
688
1
5月 25
1236
0
3月 25
729