Skip to content

Commit

Permalink
[MIG] rma_sale_mrp: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPForgeFlow committed Aug 23, 2023
1 parent 5a08b4a commit b884afa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion rma_sale_mrp/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "RMA Manufacturing Integration",
"version": "14.0.1.1.0",
"version": "16.0.1.0.0",
"license": "LGPL-3",
"category": "RMA",
"summary": "Integrates RMA with Kit Manufacturing/Sale Process",
Expand Down
24 changes: 11 additions & 13 deletions rma_sale_mrp/tests/test_rma_mrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _create_receipt(self, product, qty, price_unit=10.0):
"picking_type_id": self.stock_picking_type_in.id,
"location_id": self.stock_location_supplier_id.id,
"location_dest_id": self.stock_location_id.id,
"move_lines": [
"move_ids": [
(
0,
0,
Expand All @@ -135,7 +135,7 @@ def _do_picking(self, picking, qty):
"""Do picking with only one move on the given date."""
picking.action_confirm()
picking.action_assign()
picking.move_lines.quantity_done = qty
picking.move_ids.quantity_done = qty
res = picking.button_validate()
if isinstance(res, dict) and res:
backorder_wiz_id = res["res_id"]
Expand All @@ -158,18 +158,16 @@ def _make_sale_order(self, product, quantity, price_unit=10.0):

def _receive_rma(self, rma_line_ids):
wizard = self.rma_make_picking.with_context(
{
"active_ids": rma_line_ids.ids,
"active_model": "rma.order.line",
"picking_type": "incoming",
"active_id": 1,
}
active_ids=rma_line_ids.ids,
active_model="rma.order.line",
picking_type="incoming",
active_id=1,
).create({})
wizard._create_picking()
pickings = rma_line_ids._get_in_pickings()
pickings.action_assign()
for picking in pickings:
for mv in picking.move_lines:
for mv in picking.move_ids:
mv.quantity_done = mv.product_uom_qty
# In case of two step pickings, ship in two steps:
while pickings.filtered(lambda p: p.state == "assigned"):
Expand Down Expand Up @@ -211,10 +209,10 @@ def test_01_kit_return_with_diff_prices(self):
order_01.order_line, order_01.order_line.price_unit
)

component_1_sm = rma_picking_01.move_lines.filtered(
component_1_sm = rma_picking_01.move_ids.filtered(
lambda x: x.product_id == self.component_product_1
)
component_2_sm = rma_picking_01.move_lines.filtered(
component_2_sm = rma_picking_01.move_ids.filtered(
lambda x: x.product_id == self.component_product_2
)

Expand All @@ -235,10 +233,10 @@ def test_01_kit_return_with_diff_prices(self):
order_02.order_line, order_02.order_line.price_unit
)

component_1_sm = rma_picking_02.move_lines.filtered(
component_1_sm = rma_picking_02.move_ids.filtered(
lambda x: x.product_id == self.component_product_1
)
component_2_sm = rma_picking_02.move_lines.filtered(
component_2_sm = rma_picking_02.move_ids.filtered(
lambda x: x.product_id == self.component_product_2
)

Expand Down

0 comments on commit b884afa

Please sign in to comment.