changeset 86c5fe21b6e9 in modules/stock_secondary_unit:default
details: 
https://hg.tryton.org/modules/stock_secondary_unit?cmd=changeset&node=86c5fe21b6e9
description:
        Add wizard to unassign quantity from inventory moves on shipment

        issue9769
        review306801011
diffstat:

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

diffs (31 lines):

diff -r c23b5917b126 -r 86c5fe21b6e9 stock.py
--- a/stock.py  Sat Dec 19 17:08:47 2020 +0100
+++ b/stock.py  Mon Apr 12 19:43:05 2021 +0200
@@ -139,7 +139,8 @@
 
     def _get_inventory_move(self, incoming_move):
         move = super()._get_inventory_move(incoming_move)
-        move.secondary_unit = incoming_move.secondary_unit
+        if move:
+            move.secondary_unit = incoming_move.secondary_unit
         return move
 
 
@@ -148,7 +149,8 @@
 
     def _get_inventory_move(self, move):
         inventory_move = super()._get_inventory_move(move)
-        inventory_move.secondary_unit = move.secondary_unit
+        if inventory_move:
+            inventory_move.secondary_unit = move.secondary_unit
         return inventory_move
 
 
@@ -157,5 +159,6 @@
 
     def _get_inventory_move(self, incoming_move):
         move = super()._get_inventory_move(incoming_move)
-        move.secondary_unit = incoming_move.secondary_unit
+        if move:
+            move.secondary_unit = incoming_move.secondary_unit
         return move

Reply via email to