Skip to Content
Menu
This question has been flagged
1 Odpoveď
3420 Zobrazenia

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()));
  })
});
Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
jún 25
366
1
jún 25
664
1
jún 25
671
1
máj 25
1225
0
mar 25
689