mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_move_force_removal: Make tests resilient
On an integration enviroment, the test may fail searching for an account that belongs to other company. Now we specifically look the an account in current company.
This commit is contained in:
@@ -24,9 +24,14 @@ class TestMove(SavepointCase):
|
||||
cls.product = cls.env["product.product"].create(
|
||||
{"name": "Test product", "type": "service"}
|
||||
)
|
||||
cls.company = cls.env.company
|
||||
account_type = cls.env.ref("account.data_account_type_other_income")
|
||||
cls.income_account = cls.env["account.account"].search(
|
||||
[("user_type_id", "=", account_type.id)], limit=1
|
||||
[
|
||||
("user_type_id", "=", account_type.id),
|
||||
("company_id", "=", cls.company.id),
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
|
||||
invoice = Form(
|
||||
|
||||
Reference in New Issue
Block a user