Skip to Content
Menu
This question has been flagged
1 Atsakyti
3627 Rodiniai

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()));
  })
});
Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
liep. 25
400
1
liep. 25
5276
0
liep. 25
823
0
birž. 25
840
1
birž. 25
1005