[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user