[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
This commit is contained in:
len-odoo
2018-09-18 16:04:33 +02:00
committed by len-odoo
parent 598fafb3aa
commit 0b9d4643ec
@@ -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):