[15.0][FIX] rma_account: fixup of procurement

This commit is contained in:
DavidJForgeFlow
2022-07-11 10:14:19 +02:00
committed by AaronHForgeFlow
parent eca8bea60a
commit 2e9672f96e

View File

@@ -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