[FIX] stock: add index on lot_id of stock.quant
For validate 5K stock move line with SN: Without index: 200 sec of SQL execution With index: 15 of SQL execution opw-2374846 X-original-commit: 21d7afca292f4c213d1fcfb4a31e0b7157eb941c
This commit is contained in:
@@ -66,7 +66,7 @@ class StockQuant(models.Model):
|
||||
domain=lambda self: self._domain_location_id(),
|
||||
auto_join=True, ondelete='restrict', readonly=True, required=True, index=True, check_company=True)
|
||||
lot_id = fields.Many2one(
|
||||
'stock.production.lot', 'Lot/Serial Number',
|
||||
'stock.production.lot', 'Lot/Serial Number', index=True,
|
||||
ondelete='restrict', readonly=True, check_company=True,
|
||||
domain=lambda self: self._domain_lot_id())
|
||||
package_id = fields.Many2one(
|
||||
|
||||
Reference in New Issue
Block a user