From c31c8cd6db9de85c08006144285ddcf812f21f31 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 11 Jun 2021 09:39:53 +0200 Subject: [PATCH] Use purchase attribute on purchase components move's origin_name issue10458 review363431002 (grafted from ab07e6eaaad584102592429e2f4b994076cdee58) --HG-- branch : 6.0 --- stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock.py b/stock.py index 8962ae8fc5..b0dbed42c8 100644 --- a/stock.py +++ b/stock.py @@ -151,7 +151,7 @@ class MovePurchase(metaclass=PoolMeta): PurchaseLineComponent = pool.get('purchase.line.component') name = super().origin_name if isinstance(self.origin, PurchaseLineComponent): - name = self.origin.line.sale.rec_name + name = self.origin.line.purchase.rec_name return name def _compute_unit_price(self, unit_price):