Skip to content

[12.0][DO NOT MERGE] Add @api.model_create_multi on crm.lead#74

Open
marielejeune wants to merge 1 commit into12.0-prg_masterfrom
12.0-crm_lead_create_multi-mle
Open

[12.0][DO NOT MERGE] Add @api.model_create_multi on crm.lead#74
marielejeune wants to merge 1 commit into12.0-prg_masterfrom
12.0-crm_lead_create_multi-mle

Conversation

@marielejeune
Copy link
Copy Markdown

@marielejeune marielejeune commented Dec 27, 2022

Create method of crm.lead in crm module has api.model decorator, hence does not allow to create by batches.
We improve it by adding api.model_create_multi decorator.

Important note:
There is a limitation to creation by batch: if all vals do not have the same type, the context that is passed through super is not consistent.
Therefore this patch will only be used in bugfix for a short period, to speed-up a huge leads import.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@marielejeune marielejeune force-pushed the 12.0-crm_lead_create_multi-mle branch 2 times, most recently from d9a3432 to fbe919c Compare January 3, 2023 10:19
@marielejeune marielejeune force-pushed the 12.0-crm_lead_create_multi-mle branch from fbe919c to 1a71cb3 Compare January 3, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant