[FIX] account_financial_report: add index to report_move_id

When running `DELETE FROM report_journal_ledger_move` this column is
checked repeatedly, even though the table is empty. On our setup that
caused the query to take hours. Adding an index solved it.
pull/750/head
Jan Verbeek 2021-01-22 18:44:42 +01:00
parent 72a7de06a4
commit 731afc8463
1 changed files with 1 additions and 0 deletions

View File

@ -722,6 +722,7 @@ class ReportJournalLedgerMoveLine(models.TransientModel):
comodel_name='report_journal_ledger_move',
required=True,
ondelete='cascade',
index=True,
)
move_line_id = fields.Many2one(
comodel_name='account.move.line',