Control when set transit location, to not try to copy a None moves.
This commit is contained in:
parent
707a282cad
commit
e23b4412aa
2
series
2
series
|
@ -71,3 +71,5 @@ allow_none_list_price.diff # [sale_price_list] allow set none as price list in a
|
|||
issue11913.diff # [trytond] Too fast worker loop
|
||||
|
||||
remove_left_right_project_work.diff # [project] Remove parent left and parent right for the project.work module.
|
||||
|
||||
stock_shipment.diff # [stock] No try to copy None moves when set transit location
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/shipment.py b/shipment.py
|
||||
index 9067c31..6c64390 100644
|
||||
--- a/trytond/trytond/modules/stock/shipment.py
|
||||
+++ b/trytond/trytond/modules/stock/shipment.py
|
||||
@@ -2476,6 +2476,8 @@ class ShipmentInternal(ShipmentAssignMixin, Workflow, ModelSQL, ModelView):
|
||||
if m.state != 'done'
|
||||
and m.from_location != shipment.transit_location
|
||||
and m.to_location != shipment.transit_location]
|
||||
+ if not moves:
|
||||
+ continue
|
||||
Move.copy(moves, default={
|
||||
'to_location': shipment.transit_location.id,
|
||||
'planned_date': shipment.planned_start_date,
|
Loading…
Reference in New Issue