IMP stk_mts_mto_rule: Add missing index

In case of big table adding the index on mts_mto_procurement_id
    improve the speed to read of mts_mto_procurement_ids
This commit is contained in:
Sébastien Beau
2019-12-14 14:00:11 +01:00
committed by David Beal
parent 6f2a29132f
commit 0ffc6244bd
2 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
##############################################################################
{'name': 'Stock MTS+MTO Rule',
'version': '9.0.1.0.0',
'version': '9.0.1.1.0',
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'license': 'AGPL-3',

View File

@@ -28,7 +28,8 @@ class ProcurementOrder(models.Model):
mts_mto_procurement_id = fields.Many2one(
'procurement.order',
string="Mto+Mts Procurement",
copy=False)
copy=False,
index=True)
mts_mto_procurement_ids = fields.One2many(
'procurement.order',
'mts_mto_procurement_id',