From cebad5f15a039e2dce3d4dca425c2d09d8f876ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 22 May 2019 18:37:08 +0200 Subject: [PATCH] Always use record name for origin name The reference field is always now included in the record name. issue8299 review271331013 --- invoice.py | 3 +-- stock.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index e743f2f960..c6afcec8be 100644 --- a/invoice.py +++ b/invoice.py @@ -113,8 +113,7 @@ class InvoiceLine(metaclass=PoolMeta): PurchaseLine = pool.get('purchase.line') name = super(InvoiceLine, self).origin_name if isinstance(self.origin, PurchaseLine): - name = (self.origin.purchase.reference - or self.origin.purchase.rec_name) + name = self.origin.purchase.rec_name return name @classmethod diff --git a/stock.py b/stock.py index feb9d05b11..8a669edce2 100644 --- a/stock.py +++ b/stock.py @@ -219,8 +219,7 @@ class Move(metaclass=PoolMeta): PurchaseLine = pool.get('purchase.line') name = super(Move, self).origin_name if isinstance(self.origin, PurchaseLine): - name = (self.origin.purchase.reference - or self.origin.purchase.rec_name) + name = self.origin.purchase.rec_name return name @classmethod