Skip to content
Snippets Groups Projects
Commit 0ceee2a1 authored by Alexandre Fayolle's avatar Alexandre Fayolle
Browse files

[IMP] add an index on account_move_line(date, id)

parent 548c8e66
No related branches found
No related tags found
No related merge requests found
......@@ -566,6 +566,9 @@ class account_move_line(osv.osv):
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'account_move_line_journal_id_period_id_index\'')
if not cr.fetchone():
cr.execute('CREATE INDEX account_move_line_journal_id_period_id_index ON account_move_line (journal_id, period_id)')
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('account_move_line_date_id_index',))
if not cr.fetchone():
cr.execute('CREATE INDEX account_move_line_date_id_index ON account_move_line (date DESC, id desc)')
return res
def _check_no_view(self, cr, uid, ids, context=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment