changeset a673b81f01c5 in modules/sale_supply_drop_shipment:5.0
details:
https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset;node=a673b81f01c5
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
(grafted from 64126fff63cff950b7d8273aa94923c3a6e4f7a7)
diffstat:
stock.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 7d554642e53d -r a673b81f01c5 stock.py
--- a/stock.py Tue Feb 19 22:12:23 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