From 0b9d4643ec8a4a235cfea0036fb1d874eadc6d71 Mon Sep 17 00:00:00 2001 From: len-odoo Date: Tue, 18 Sep 2018 10:48:24 +0200 Subject: [PATCH] [FIX] point_of_sale: make test work with localisation modules When localisation modules such as l10n_no are installed, the test TestAngloSaxonCommon broke. We isolate the test more by setting the right accounts on the products to make the test pass. This is useful for odoo.sh clients that install localisation modules and see the tests break. opw 1881014 --- addons/point_of_sale/tests/test_anglo_saxon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/point_of_sale/tests/test_anglo_saxon.py b/addons/point_of_sale/tests/test_anglo_saxon.py index b6d27af9505..8bc642ab7ce 100644 --- a/addons/point_of_sale/tests/test_anglo_saxon.py +++ b/addons/point_of_sale/tests/test_anglo_saxon.py @@ -36,9 +36,13 @@ class TestAngloSaxonCommon(common.TransactionCase): self.product = self.product.copy({'name': 'New product','standard_price': 100}) self.company.anglo_saxon_accounting = True self.product.categ_id = self.category + self.product.property_account_expense_id = account_expense + self.product.property_account_income_id = self.account sale_journal = self.env['account.journal'].create({'name': 'POS journal', 'type': 'sale', 'code': 'POS00'}) self.pos_config.journal_id = sale_journal self.cash_journal = self.env['account.journal'].create({'name': 'CASH journal', 'type': 'cash', 'code': 'CSH00'}) + self.pos_config.invoice_journal_id = False + self.pos_config.journal_ids = [self.cash_journal.id] class TestAngloSaxonFlow(TestAngloSaxonCommon):