From 3742c773105908044feddb6737ab1ccce305e95d Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 2 Dec 2021 17:55:43 +0100 Subject: [PATCH] [FIX] rma_repair: Be sure to use records of current company --- rma_repair/tests/test_rma_repair.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rma_repair/tests/test_rma_repair.py b/rma_repair/tests/test_rma_repair.py index a36661a4..31a6e367 100644 --- a/rma_repair/tests/test_rma_repair.py +++ b/rma_repair/tests/test_rma_repair.py @@ -82,7 +82,8 @@ class TestRmaRepair(common.SingleTransactionCase): }) # Create Invoices: customer_account = cls.acc_obj.search( - [('user_type_id', '=', receivable_type.id)], limit=1).id + [('user_type_id', '=', receivable_type.id), + ('company_id', '=', cls.env.user.company_id.id)], limit=1).id cls.inv_customer = cls.inv_obj.create({ 'partner_id': customer1.id, 'account_id': customer_account, @@ -125,7 +126,8 @@ class TestRmaRepair(common.SingleTransactionCase): 'type': 'customer', }) cls.bank_journal = cls.env['account.journal'].search( - [('type', '=', 'bank')], limit=1) + [('type', '=', 'bank'), + ('company_id', '=', cls.env.user.company_id.id)], limit=1) cls.material = cls.product_obj.create({ 'name': 'Materials', 'type': 'product',