changeset eef780758216 in modules/sale:6.0
details: https://hg.tryton.org/modules/sale?cmd=changeset&node=eef780758216
description:
        Get return sale from sale's origin

        issue10702
        review369591002
        (grafted from 125ab979d3e3f47dae2effaa3f23e338cb07b2d5)
diffstat:

 stock.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 54221d23053d -r eef780758216 stock.py
--- a/stock.py  Thu Sep 02 23:19:36 2021 +0200
+++ b/stock.py  Sat Sep 04 09:47:24 2021 +0200
@@ -165,8 +165,8 @@
                 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:

Reply via email to