From 969ea2a0d3b0023854996afc5b89eeb4b11c3e34 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 14 May 2020 13:33:47 +0000 Subject: [PATCH] [FIX] account: Wrong base amount with included tax Fine tuning of the test of https://github.com/odoo/odoo/commit/d9eaae8acc600f936fbc4fa48a49a7f4d65fcd7f As the journal was not explicitely set, a default journal with a company different that the one set up from function setUpClass() defined in class InvoiceTestCommon So a traceback was sometimes raised in the test saying: Some records are incompatible with the company of the Journal Item.\n\nIncompatibilities:\nFields: account_id\nRecord ids: 1809, 1810, 1811 opw:2244708 closes odoo/odoo#51285 X-original-commit: dd40fb63b4ebdd4dd7b44c75d415e99b52d633a1 Signed-off-by: Laurent Smet Signed-off-by: Simon Goffin (sig) --- addons/account/tests/test_account_move_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/tests/test_account_move_entry.py b/addons/account/tests/test_account_move_entry.py index c9aed21ba67..4aa3c3a1f6d 100644 --- a/addons/account/tests/test_account_move_entry.py +++ b/addons/account/tests/test_account_move_entry.py @@ -599,9 +599,9 @@ class TestAccountMove(AccountTestInvoicingCommon): 'price_include': True, 'include_base_amount': False, }) - self.account = self.env['account.account'].search([('deprecated', '=', False)], limit=1) + self.account = self.company_data['default_account_revenue'] - move_form = Form(self.env['account.move']) + move_form = Form(self.env['account.move'].with_context(default_move_type='entry')) # Create a new account.move.line with debit amount. with move_form.line_ids.new() as debit_line: