[IMP] mrp: performance on move
With a database that contains a lot of production with kits or BoM with a lot of bom.line. The database could become slow. Index on stock.move <-> mrp.production could improve it. closes odoo/odoo#51870 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -69,9 +69,9 @@ class StockMove(models.Model):
|
||||
|
||||
created_production_id = fields.Many2one('mrp.production', 'Created Production Order', check_company=True)
|
||||
production_id = fields.Many2one(
|
||||
'mrp.production', 'Production Order for finished products', check_company=True)
|
||||
'mrp.production', 'Production Order for finished products', check_company=True, index=True)
|
||||
raw_material_production_id = fields.Many2one(
|
||||
'mrp.production', 'Production Order for components', check_company=True)
|
||||
'mrp.production', 'Production Order for components', check_company=True, index=True)
|
||||
unbuild_id = fields.Many2one(
|
||||
'mrp.unbuild', 'Disassembly Order', check_company=True)
|
||||
consume_unbuild_id = fields.Many2one(
|
||||
|
||||
Reference in New Issue
Block a user