تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2094 أدوات العرض

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
أكتوبر 18
4342
6
أكتوبر 20
5478
2
ديسمبر 18
5067
2
أغسطس 25
3399
3
يوليو 25
2529