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

Hello,

I have a problem when invoice a sale order, the discount is not always correctly displayed. 
It's on Odoo.SH and sometimes he display the discount with a lot of digits behind the comma. 

Anyone has the same problem or has a solution to this?

Mostly after restarting the http worker it's all fine again.



아바타
취소
작성자

Yes, this is fixed at 2 decimals

베스트 답변

I have the same problem, it seems to me like OCA module "account_invoice_triple_discount" is causing it. Do you have that module installed?

아바타
취소
작성자

Yes, below find the solution that helped me to solve the problem.

def _compute_all_tax(self):
"""
As the taxes are recalculated based on a single discount, we need to
simulate a multiple discount by changing discount value. Values are
restored after the original process is done
"""
digits = self._fields["discount"]._digits
self._fields["discount"]._digits = (16, 2) # This is added to avoid errors and adding a lot of zero's after comma

베스트 답변

Did you check the decimal accuracy of the Discount, You can check and update its decimal precision

아바타
취소
관련 게시물 답글 화면 활동
3
10월 18
4513
6
10월 20
5588
2
12월 18
5298
2
8월 25
3778
3
7월 25
2785