Skip to content

Commit

Permalink
Find leaf sub-locations instead of all children
Browse files Browse the repository at this point in the history
We will never do a put-away in an intermediate location,
so they should never be kept as candidate locations for the
put-away.

Follow the change in OCA#12
  • Loading branch information
guewen authored and rousseldenis committed Sep 18, 2023
1 parent d394c42 commit 37fe473
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stock_storage_type_putaway_abc/models/stock_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_storage_locations(self, products=None):
return super().get_storage_locations(products)

def _get_abc_locations(self, products):
return self.children_ids._sort_abc_locations(first(products).abc_storage)
return self.leaf_location_ids._sort_abc_locations(first(products).abc_storage)

def _sort_abc_locations(self, product_abc):
product_abc = product_abc or "a"
Expand Down

0 comments on commit 37fe473

Please sign in to comment.