Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3409 Vistas

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
Descartar
Mejor respuesta

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
jun 25
342
1
jun 25
651
1
jun 25
648
1
may 25
1206
0
mar 25
676