[FIX] account: tax sign in supplier invoice
When changing manually the the amount of tax in supplier invoice, the tax sign of the tax must be kept. opw:645691
This commit is contained in:
parent
6f355623f0
commit
663be8118f
|
@ -1533,7 +1533,8 @@ 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)
|
||||
return {'value': {'tax_amount': amount}}
|
||||
tax_sign = self.env['account.tax'].search([('name', '=', self.name), ('company_id', '=', self.company_id.id)]).tax_sign
|
||||
return {'value': {'tax_amount': amount * tax_sign}}
|
||||
|
||||
@api.v8
|
||||
def compute(self, invoice):
|
||||
|
|
Loading…
Reference in New Issue