Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3622 Prikazi

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
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jul. 25
400
1
jul. 25
5276
0
jul. 25
821
0
jun. 25
840
1
jun. 25
1004