From b796ffdfc1d229c232472e29f7dbc9105c1086f8 Mon Sep 17 00:00:00 2001 From: AaronHForgeFlow Date: Mon, 6 May 2024 18:30:14 +0200 Subject: [PATCH] [FIX] rma: lot reservation error: qty_done -> quantity reserved_qty field does no exist anymore --- rma/wizards/rma_add_stock_move.py | 2 +- rma/wizards/rma_make_picking.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rma/wizards/rma_add_stock_move.py b/rma/wizards/rma_add_stock_move.py index aedffad3..d50fd84a 100644 --- a/rma/wizards/rma_add_stock_move.py +++ b/rma/wizards/rma_add_stock_move.py @@ -130,7 +130,7 @@ class RmaAddStockMove(models.TransientModel): elif sm.product_id.tracking == "lot": product_qty = sum( sm.move_line_ids.filtered(lambda x: x.lot_id.id == lot.id).mapped( - "qty_done" + "quantity" ) ) data = { diff --git a/rma/wizards/rma_make_picking.py b/rma/wizards/rma_make_picking.py index b36f47dd..bfb72b08 100644 --- a/rma/wizards/rma_make_picking.py +++ b/rma/wizards/rma_make_picking.py @@ -230,8 +230,7 @@ class RmaMakePicking(models.TransientModel): ) move.move_line_ids.write( { - "reserved_uom_qty": 1, - "qty_done": 0, + "quantity": 0, } ) elif move.product_id.tracking == "lot": @@ -250,8 +249,7 @@ class RmaMakePicking(models.TransientModel): { "lot_id": move.rma_line_id.lot_id.id, "product_uom_id": move.product_id.uom_id.id, - "qty_done": 0, - "reserved_uom_qty": qty, + "quantity": qty, } ) move_line_model.create(move_line_data)