Skip to content

Commit

Permalink
[FIX] rma_account: tests for multistep quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronHForgeFlow committed Nov 23, 2023
1 parent f5a2365 commit e705d01
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions rma_account/tests/test_rma_stock_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ def test_08_cost_from_move_multi_step(self):
"""
# Alter the customer RMA route to make it multi-step
# Get rid of the duplicated rule
self.env.ref("rma.rule_rma_customer_out_pull").active = False
self.env.ref("rma.rule_rma_customer_in_pull").active = False
self.customer_route.rule_ids.active = False
self.env["stock.location.route"].search([]).active = False
self.customer_route.active = True
# to be able to receive in in WH
cust_in_pull_rule = self.customer_route.rule_ids.filtered(
lambda r: r.location_id == self.stock_rma_location
)
Expand All @@ -275,11 +277,12 @@ def test_08_cost_from_move_multi_step(self):
"name": "RMA->Output",
"action": "pull",
"warehouse_id": self.wh.id,
"location_src_id": self.env.ref("rma.location_rma").id,
"location_src_id": self.wh.lot_rma_id.id,
"location_id": self.output_location.id,
"procure_method": "make_to_stock",
"route_id": self.customer_route.id,
"picking_type_id": self.env.ref("stock.picking_type_internal").id,
"group_propagation_option": "propagate",
}
)
self.env["stock.rule"].create(
Expand All @@ -291,7 +294,8 @@ def test_08_cost_from_move_multi_step(self):
"location_id": self.customer_location.id,
"procure_method": "make_to_order",
"route_id": self.customer_route.id,
"picking_type_id": self.env.ref("stock.picking_type_internal").id,
"picking_type_id": self.env.ref("stock.picking_type_out").id,
"group_propagation_option": "propagate",
}
)
self.env["stock.rule"].create(
Expand All @@ -303,19 +307,21 @@ def test_08_cost_from_move_multi_step(self):
"location_id": self.input_location.id,
"procure_method": "make_to_stock",
"route_id": self.customer_route.id,
"picking_type_id": self.env.ref("stock.picking_type_internal").id,
"picking_type_id": self.env.ref("stock.picking_type_in").id,
"group_propagation_option": "propagate",
}
)
self.env["stock.rule"].create(
{
"name": "Input->RMA",
"action": "pull",
"warehouse_id": self.wh.id,
"location_src_id": self.customer_location.id,
"location_id": self.env.ref("rma.location_rma").id,
"location_src_id": self.input_location.id,
"location_id": self.wh.lot_rma_id.id,
"procure_method": "make_to_order",
"route_id": self.customer_route.id,
"picking_type_id": self.env.ref("stock.picking_type_in").id,
"picking_type_id": self.env.ref("stock.picking_type_internal").id,
"group_propagation_option": "propagate",
}
)
# Set a standard price on the products
Expand Down

0 comments on commit e705d01

Please sign in to comment.