From d423fc0ce1fc66425ba8112501b1cd2c42e3a66d Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Sat, 4 Sep 2021 09:47:24 +0200 Subject: [PATCH] Get return sale from sale's origin issue10702 review369591002 (grafted from 125ab979d3e3f47dae2effaa3f23e338cb07b2d5) --HG-- branch : 6.0 --- stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index b4ae0d884a..b461142a04 100644 --- a/stock.py +++ b/stock.py @@ -165,8 +165,8 @@ class Move(metaclass=PoolMeta): and self.origin.quantity < 0 and self.from_location.type != 'storage' and self.to_location.type == 'storage' - and isinstance(self.origin.origin, Sale)): - sale = self.origin.origin + and isinstance(self.origin.sale.origin, Sale)): + sale = self.origin.sale.origin cost = Decimal(0) qty = Decimal(0) for move in sale.moves: