Use purchase attribute on purchase components move's origin_name

issue10458
review363431002
(grafted from ab07e6eaaad584102592429e2f4b994076cdee58)

--HG--
branch : 6.0
This commit is contained in:
Sergi Almacellas Abellana committed 2021-06-11 09:39:53 +02:00
1 parent 7acd494b5b
commit c31c8cd6db
1 file changed
+1 -1
+1 -1
View File
@@ -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):