[FIX] account: add index

Before this commit the time to unlink an account.move can take lot of time (60s on large database).

closes odoo/odoo#161172

X-original-commit: 73c1fdd192577bba56dcad213d8a22de8b5de06f
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
This commit is contained in:
Florent de Labarre
2024-04-10 09:44:13 +00:00
committed by oco-odoo
parent a26d3b245d
commit af096f3ecf
@@ -18,7 +18,7 @@ class AccountPartialReconcile(models.Model):
index=True, required=True)
full_reconcile_id = fields.Many2one(
comodel_name='account.full.reconcile',
string="Full Reconcile", copy=False)
string="Full Reconcile", copy=False, index='btree_not_null')
exchange_move_id = fields.Many2one(comodel_name='account.move', index='btree_not_null')
# ==== Currency fields ====