mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX]rma: remove test_rma dependency to Account
This commit is contained in:
committed by
AlexPForgeFlow
parent
18f64b703c
commit
fc6f683777
@@ -10,7 +10,13 @@ class TestRmaAccountUnreconciled(TestRma):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
cls.rma_refund_wiz = cls.env["rma.refund"]
|
cls.rma_refund_wiz = cls.env["rma.refund"]
|
||||||
for categ in cls.rma_customer_id.with_user(cls.rma_manager_user).mapped(
|
cls.g_account_manager = cls.env.ref("account.group_account_manager")
|
||||||
|
cls.rma_manager_user_account = cls._create_user(
|
||||||
|
"rma manager account",
|
||||||
|
[cls.g_stock_manager, cls.g_rma_manager, cls.g_account_manager],
|
||||||
|
cls.company,
|
||||||
|
)
|
||||||
|
for categ in cls.rma_customer_id.with_user(cls.rma_manager_user_account).mapped(
|
||||||
"rma_line_ids.product_id.categ_id"
|
"rma_line_ids.product_id.categ_id"
|
||||||
):
|
):
|
||||||
categ.write(
|
categ.write(
|
||||||
@@ -29,9 +35,9 @@ class TestRmaAccountUnreconciled(TestRma):
|
|||||||
"reconcile": True,
|
"reconcile": True,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
for product in cls.rma_customer_id.with_user(cls.rma_manager_user).mapped(
|
for product in cls.rma_customer_id.with_user(
|
||||||
"rma_line_ids.product_id"
|
cls.rma_manager_user_account
|
||||||
):
|
).mapped("rma_line_ids.product_id"):
|
||||||
product.write(
|
product.write(
|
||||||
{
|
{
|
||||||
"standard_price": 10.0,
|
"standard_price": 10.0,
|
||||||
@@ -85,7 +91,7 @@ class TestRmaAccountUnreconciled(TestRma):
|
|||||||
)
|
)
|
||||||
make_refund.invoice_refund()
|
make_refund.invoice_refund()
|
||||||
self.rma_customer_id.with_user(
|
self.rma_customer_id.with_user(
|
||||||
self.rma_manager_user
|
self.rma_manager_user_account
|
||||||
).rma_line_ids.refund_line_ids.move_id.filtered(
|
).rma_line_ids.refund_line_ids.move_id.filtered(
|
||||||
lambda x: x.state != "posted"
|
lambda x: x.state != "posted"
|
||||||
).action_post()
|
).action_post()
|
||||||
|
|||||||
Reference in New Issue
Block a user