콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3948 화면

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()));
  })
});
아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
0
7월 25
817
1
7월 25
5944
0
7월 25
1619
0
6월 25
1581
1
6월 25
1494