From 2f6f4307b5f4fb1e6c893c4dea40771c963aec38 Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Tue, 13 Nov 2018 11:53:47 +0100 Subject: [PATCH] Add issue5578.diff --- issue7856.diff | 30 ++++++++++++++++++++++++++++++ series | 1 + 2 files changed, 31 insertions(+) create mode 100644 issue7856.diff diff --git a/issue7856.diff b/issue7856.diff new file mode 100644 index 0000000..4767a6a --- /dev/null +++ b/issue7856.diff @@ -0,0 +1,30 @@ +diff -r ab230d7946e7 trytond/trytond/modules/stock/move.py +--- a/trytond/trytond/modules/stock/move.py Tue Nov 13 11:38:24 2018 +0100 ++++ b/trytond/trytond/modules/stock/move.py Tue Nov 13 11:39:08 2018 +0100 +@@ -4,6 +4,7 @@ + import operator + from decimal import Decimal + from functools import partial ++from collections import OrderedDict + from itertools import groupby + + from sql import Literal, Union, Column +@@ -794,7 +795,8 @@ + if move.state != 'draft': + continue + to_location = move.to_location +- location_qties = {} ++ # Keep location order for pick_product ++ location_qties = OrderedDict() + if with_childs: + childs = Location.search([ + ('parent', 'child_of', [move.from_location.id]), +@@ -802,6 +804,8 @@ + else: + childs = [move.from_location] + for location in childs: ++ if location.id == to_location.id: ++ continue + key = get_key(location) + if key in pbl: + location_qties[location] = Uom.compute_qty( diff --git a/series b/series index 477b1bd..a8203b3 100644 --- a/series +++ b/series @@ -129,6 +129,7 @@ issue6371.diff # stock Do not set effective date on assignation #filestore.diff stock_lot_check_moves_without_lot_before_lot_required.diff issue3228.diff # [trytond] Fix result order of search_read +issue7856.diff # [stock] Can't move qty from a parent location to child location # electr # issue6626_improve_performance_of_average_cost_price.diff