diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index d7bec0cb579..97c67985d35 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -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) diff --git a/addons/account/tests/test_account_customer_invoice.py b/addons/account/tests/test_account_customer_invoice.py index 0c559892644..230120f5518 100644 --- a/addons/account/tests/test_account_customer_invoice.py +++ b/addons/account/tests/test_account_customer_invoice.py @@ -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"