diff --git a/product/ERP5/mixin/builder.py b/product/ERP5/mixin/builder.py index 27444e97e49a135f4f6b62575a3fe9bab6916ee6..4b0e1e28a86237df8085cfe9a92e873aac5070b0 100644 --- a/product/ERP5/mixin/builder.py +++ b/product/ERP5/mixin/builder.py @@ -180,12 +180,13 @@ class BuilderMixin(XMLObject, Amount, Predicate): # Inventory can be negative in some date, and positive in futur !! # This must be done by subclassing OrderBuilder with a new inventory # algorithm. + inventory_kw = kw.copy() + inventory_kw.setdefault('group_by_variation', 1) + inventory_kw.setdefault('group_by_resource', 1) + inventory_kw.setdefault('group_by_section', 0) sql_list = self.portal_simulation.getFutureInventoryList( - group_by_variation=1, - group_by_resource=1, group_by_node=group_by_node, - group_by_section=0, - **kw) + **inventory_kw) # min_flow and max_delay are stored on a supply line. By default # we can get them through a method having the right supply type prefix # like getPurchaseSupplyLineMinFlow. So we need to guess the supply prefix