changeset 64126fff63cf in modules/sale_supply_drop_shipment:default
details: 
https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset;node=64126fff63cf
description:
        Do not fail on purchase line not linked to a request

        If a line is added to a purchase for drop shipment, it will not be 
linked to a
        purchase request and so there will be no link to any sale line.
        In such case, the drop shipment will warn about the new customer move 
without
        origin and the user will be responsible to invoice it manually.

        issue8038
        review269181002
diffstat:

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

diffs (14 lines):

diff -r ec611efea8db -r 64126fff63cf stock.py
--- a/stock.py  Fri Mar 22 15:33:44 2019 +0100
+++ b/stock.py  Fri Mar 22 18:22:34 2019 +0100
@@ -522,7 +522,9 @@
             for move in shipment.supplier_moves:
                 if not move.origin:
                     continue
-                sale_line = request2sline[pline2request[move.origin]]
+                sale_line = request2sline.get(pline2request.get(move.origin))
+                if not sale_line:
+                    continue
                 for move in sale_line.moves:
                     if (move.state not in ('cancel', 'done')
                             and not move.shipment

Reply via email to