[FIX] account: fix forward port bug induced by 6466aa499f

This commit is contained in:
Yannick Tivisse
2016-10-21 12:49:25 +02:00
parent b87e6e02a8
commit 37c8b82a01
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1362,7 +1362,7 @@ class AccountInvoiceTax(models.Model):
if tax.invoice_id and key in tax_grouped[tax.invoice_id.id]:
tax.base = tax_grouped[tax.invoice_id.id][key]['base']
else:
_logger.warning('Tax Base Amount not computable probably due to a change in an underlying tax (%s).', tax.tax_id.name)
tax.base = 0.0
invoice_id = fields.Many2one('account.invoice', string='Invoice', ondelete='cascade', index=True)
name = fields.Char(string='Tax Description', required=True)
@@ -61,6 +61,7 @@ class TestAccountCustomerInvoice(AccountTestUsers):
'amount': 9050,
'account_id': self.ova.id,
'invoice_id': self.account_invoice_customer0.id,
'tax_id': self.env['account.tax'].search([('type_tax_use', '=', 'sale')], limit=1).id
}
tax = self.env['account.invoice.tax'].create(invoice_tax_line)
assert tax, "Tax has not been assigned correctly"