From 471be04eb27b93383aa8fdfe86695cfce23ef997 Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Mon, 11 Jul 2022 09:41:26 +0200 Subject: [PATCH] [14.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