From 4f6eebf698b78cdd2001129f231c0a0e2868d4ad Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 5 Aug 2015 17:42:47 +0200 Subject: [PATCH] [FIX] account: tax sign Division by 0 introduced by c525c6712aeeaf65c975f10ff53f81f835baca30 --- addons/account/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index a9b181e2555..7fc83b4e42a 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1533,7 +1533,7 @@ class account_invoice_tax(models.Model): currency = self.env['res.currency'].browse(currency_id) currency = currency.with_context(date=date_invoice or fields.Date.context_today(self)) amount = currency.compute(amount, company.currency_id, round=False) - tax_sign = self.tax_amount/self.amount + tax_sign = (self.tax_amount / self.amount) if self.amount else 1 return {'value': {'tax_amount': amount * tax_sign}} @api.v8