From af096f3ecf26e074c34369d764ac2245495f8c5d Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Mon, 6 Nov 2023 17:21:03 +0000 Subject: [PATCH] [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) --- addons/account/models/account_partial_reconcile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_partial_reconcile.py b/addons/account/models/account_partial_reconcile.py index f9dad7ab28a..3e3cc8478fc 100644 --- a/addons/account/models/account_partial_reconcile.py +++ b/addons/account/models/account_partial_reconcile.py @@ -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 ====