Add indexes on account payment models

The fields where the indexes are added are used in searches in
account_payment_order, which becomes really slow when a database have
many lines.
This commit is contained in:
Guewen Baconnier
2019-05-07 11:25:35 +02:00
committed by Marçal Isern
parent c5b634b764
commit 672d8697c7

View File

@@ -11,5 +11,6 @@ class AccountMoveLine(models.Model):
'account.payment.mode',
string='Payment Mode',
domain="[('company_id', '=', company_id)]",
ondelete='restrict'
ondelete='restrict',
index=True,
)