From eea2b211a1e492fe650e1a99e2b14171681b3f32 Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Mon, 11 Jul 2022 10:14:19 +0200 Subject: [PATCH] [15.0][FIX] rma_account: fixup of procurement --- rma_account/models/procurement.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rma_account/models/procurement.py b/rma_account/models/procurement.py index 9404d1c2..7a3ae703 100644 --- a/rma_account/models/procurement.py +++ b/rma_account/models/procurement.py @@ -30,6 +30,7 @@ class StockRule(models.Model): ) if "rma_line_id" in values: line = values.get("rma_line_id") + line = self.env["rma.order.line"].browse([line]) move = line.reference_move_id if move and move.stock_valuation_layer_ids: cost = move.stock_valuation_layer_ids[-1].unit_cost