From fbbe9b54d4bcf2113efeeb189f616837df1d3367 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 19 Apr 2017 11:47:03 +0200 Subject: [PATCH] [FIX] stock: package with different products In function _get_top_level_packages, when checking that all the products have the same destination, the destinations must be stocked in a set instead of a list because with different products it could return a list with duplicated destinations. opw:725720 --- addons/stock/models/stock_quant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index bc92016d5f3..de4cf2b5fa6 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -537,7 +537,7 @@ class Quant(models.Model): if any(quant not in self for quant in package.get_content()): all_in = False if all_in: - destinations = [product_to_location[product] for product in package.get_content().mapped('product_id')] + destinations = set([product_to_location[product] for product in package.get_content().mapped('product_id')]) if len(destinations) > 1: all_in = False if all_in: