diff --git a/account_invoice_margin_sale/tests/test_account_invoice_margin_sale.py b/account_invoice_margin_sale/tests/test_account_invoice_margin_sale.py index a743a8b8..48341be1 100644 --- a/account_invoice_margin_sale/tests/test_account_invoice_margin_sale.py +++ b/account_invoice_margin_sale/tests/test_account_invoice_margin_sale.py @@ -23,6 +23,17 @@ def setUpClass(cls): } ) cls.partner.property_account_receivable_id = cls.account + # No chart of accounts is installed during at-install tests on a + # fresh database, so provide the accounts invoice lines need. + cls.income_account = cls.env["account.account"].create( + { + "name": "Test income account", + "code": "TESTINC", + "account_type": "income", + } + ) + cls.env.company.income_account_id = cls.income_account + cls.journal.default_account_id = cls.income_account cls.product_categ = cls.env["product.category"].create( {"name": "Test category"} )