mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
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:
committed by
Carlos Roca
parent
a8c3920627
commit
2769011d68
@@ -15,7 +15,9 @@ class AccountMoveLine(models.Model):
|
||||
help='Bank account on which we should pay the supplier')
|
||||
bank_payment_line_id = fields.Many2one(
|
||||
'bank.payment.line', string='Bank Payment Line',
|
||||
readonly=True)
|
||||
readonly=True,
|
||||
index=True,
|
||||
)
|
||||
payment_line_ids = fields.One2many(
|
||||
comodel_name='account.payment.line',
|
||||
inverse_name='move_line_id',
|
||||
|
||||
Reference in New Issue
Block a user