changeset 7d1b2df437ee in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=7d1b2df437ee
description:
        Use only incoming or outgoing moves for origins

        Since issue8253, other moves may have another stock move as origin 
which is
        not interesting as shipment origins.
diffstat:

 shipment.py |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 40fe4e26830d -r 7d1b2df437ee shipment.py
--- a/shipment.py       Mon Jul 08 17:18:14 2019 +0200
+++ b/shipment.py       Tue Jul 09 15:29:12 2019 +0200
@@ -342,7 +342,7 @@
 
     def get_origins(self, name):
         return ', '.join(set(filter(None,
-                    (m.origin_name for m in self.moves))))
+                    (m.origin_name for m in self.incoming_moves))))
 
     @classmethod
     def create(cls, vlist):
@@ -1072,7 +1072,7 @@
 
     def get_origins(self, name):
         return ', '.join(set(filter(None,
-                    (m.origin_name for m in self.moves))))
+                    (m.origin_name for m in self.outgoing_moves))))
 
     @classmethod
     @ModelView.button
@@ -1637,7 +1637,7 @@
 
     def get_origins(self, name):
         return ', '.join(set(filter(None,
-                    (m.origin_name for m in self.moves))))
+                    (m.origin_name for m in self.incoming_moves))))
 
     @classmethod
     def create(cls, vlist):

Reply via email to