[FIX] account: tax sign

Division by 0 introduced by c525c6712a
This commit is contained in:
Goffin Simon 2015-08-05 17:42:47 +02:00 committed by Christophe Simonis
parent 5a41a3011a
commit 4f6eebf698
1 changed files with 1 additions and 1 deletions

View File

@ -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