[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
This commit is contained in:
Goffin Simon
2017-04-19 13:03:25 +02:00
parent 72b7eb7e6e
commit fbbe9b54d4
+1 -1
View File
@@ -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: