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

Hi,


in an invoice, when you change the discount on a line, amount of the line and of the invoice is automatically recalculated.


I would like to do the same by clicking on a button that i've added in the invoice form view. 

Probably by calling the same function than the automatic way.


Is anybody know how to do that?


Vincent

아바타
취소
베스트 답변

I don't know the version, but in your button click you can add some custom code like in V13,

for line in self.move_line_ids:

    line._onchange_price_subtotal()

아바타
취소
작성자 베스트 답변

Hello Abdalmola Mustapha,

Sorry i don't understood your answer.

Could you explain differently or share an example please.

Vincent

아바타
취소
베스트 답변

in line automatic calculate but if only if customize in method calculate  to stop auto discount
after that using your method to calculate discount

아바타
취소
관련 게시물 답글 화면 활동
2
5월 25
1456
0
3월 15
3570
2
3월 15
6886
1
7월 25
1150
2
7월 25
1341