changeset 69058efe682d in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=69058efe682d
description:
        Require unit price also for view location like for storage

        issue11181
        review355951002
diffstat:

 move.py |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r c4bfa3a551c3 -r 69058efe682d move.py
--- a/move.py   Thu Feb 03 23:13:27 2022 +0100
+++ b/move.py   Fri Feb 04 21:36:26 2022 +0100
@@ -445,15 +445,15 @@
         from_type = self.from_location.type if self.from_location else None
         to_type = self.to_location.type if self.to_location else None
 
-        if from_type == 'supplier' and to_type in {'storage', 'drop'}:
+        if from_type == 'supplier' and to_type in {'storage', 'drop', 'view'}:
             return True
         if from_type == 'production' and to_type != 'lost_found':
             return True
-        if from_type in {'storage', 'drop'} and to_type == 'customer':
+        if from_type in {'storage', 'drop', 'view'} and to_type == 'customer':
             return True
-        if from_type == 'storage' and to_type == 'supplier':
+        if from_type in {'storage', 'view'} and to_type == 'supplier':
             return True
-        if from_type == 'customer' and to_type == 'storage':
+        if from_type == 'customer' and to_type == {'storage', 'view'}:
             return True
         return False
 

Reply via email to