contract icon indicating copy to clipboard operation
contract copied to clipboard

[18.0][IMP] contract: Add index on account.move old_contract_id

Open qgroulard opened this issue 4 months ago • 6 comments

This field is often searched which may be slow on DB with a lot of account moves.

qgroulard avatar Oct 30 '25 14:10 qgroulard

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). 🤖

OCA-git-bot avatar Nov 09 '25 16:11 OCA-git-bot

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...

pedrobaeza avatar Nov 10 '25 07:11 pedrobaeza

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.

qgroulard avatar Nov 12 '25 09:11 qgroulard

Go ahead then.

pedrobaeza avatar Nov 12 '25 10:11 pedrobaeza

The field hasn't been removed as talked.

pedrobaeza avatar Nov 27 '25 07:11 pedrobaeza

That's still on my todo list but the go-live of a major customer in a few days leaves me little time.

qgroulard avatar Nov 27 '25 08:11 qgroulard