Limit size of grouping_filter ids
The list of ids in grouping_filter are used inside an IN-clause so we must limit the size. issue10589 review379471002
This commit is contained in:
1 parent
be94fe8fe2
commit
902f7527ce
1 file changed
+6
-2
@@ -94,8 +94,12 @@ class Lot(ModelSQL, ModelView, LotMixin, StockMixin):
|
||||
def get_quantity(cls, lots, name):
|
||||
location_ids = Transaction().context.get('locations')
|
||||
product_ids = list(set(l.product.id for l in lots))
|
||||
return cls._get_quantity(lots, name, location_ids,
|
||||
grouping=('product', 'lot',), grouping_filter=(product_ids,))
|
||||
quantities = {}
|
||||
for product_ids in grouped_slice(product_ids):
|
||||
quantities.update(cls._get_quantity(lots, name, location_ids,
|
||||
grouping=('product', 'lot',),
|
||||
grouping_filter=(list(product_ids),)))
|
||||
return quantities
|
||||
|
||||
@classmethod
|
||||
def search_quantity(cls, name, domain=None):
|
||||
|
||||
Reference in new issue
Block a user