Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2116 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ต.ค. 18
4411
6
ต.ค. 20
5513
2
ธ.ค. 18
5130
2
ส.ค. 25
3506
Analytic Accounting in v17 แก้ไขแล้ว
3
ก.ค. 25
2590