Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3486 Visualizzazioni

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
Abbandona
Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
lug 25
267
0
giu 25
494
1
giu 25
712
1
giu 25
739
1
mag 25
1288