[18.0][IMP] contract: Add index on account.move old_contract_id
This field is often searched which may be slow on DB with a lot of account moves.
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
There's only one search:
https://github.com/OCA/contract/blob/1df7f34a14fc23e5deef03eed84d316f2292f5ed/contract/models/contract.py#L426
and that one is only for retro-compatibility with 11-. I'm wondering if we should still provide that compatibility...
There's only one search:
https://github.com/OCA/contract/blob/1df7f34a14fc23e5deef03eed84d316f2292f5ed/contract/models/contract.py#L426
and that one is only for retro-compatibility with 11-. I'm wondering if we should still provide that compatibility...
I agree we should consider removing this feature.
Go ahead then.
The field hasn't been removed as talked.
That's still on my todo list but the go-live of a major customer in a few days leaves me little time.