Skip to content

[19.0][MIG] crm_lead_to_opportunity_contact - #755

Open
MarcGForgeFlow wants to merge 6 commits into
OCA:19.0from
MarcGForgeFlow:19.0-mig-crm_lead_to_opportunity_contact
Open

[19.0][MIG] crm_lead_to_opportunity_contact#755
MarcGForgeFlow wants to merge 6 commits into
OCA:19.0from
MarcGForgeFlow:19.0-mig-crm_lead_to_opportunity_contact

Conversation

@MarcGForgeFlow

@MarcGForgeFlow MarcGForgeFlow commented Jul 8, 2026

Copy link
Copy Markdown

Migration of crm_lead_to_opportunity_contact to 19.0.

This revives #533 (16.0 migration), which was closed by the stale bot due to inactivity, not rejected. The original author's commits are preserved.

@alexis-via FYI (original author).

With this module, in the lead to opportunity wizard, you have a new
option: create a new contact on an existing customer
Simple migration of the module crm_lead_to_opportunity_contact from v14 to v16
@OCA-git-bot OCA-git-bot added series:19.0 mod:crm_lead_to_opportunity_contact Module crm_lead_to_opportunity_contact labels Jul 8, 2026
@MarcGForgeFlow
MarcGForgeFlow force-pushed the 19.0-mig-crm_lead_to_opportunity_contact branch from dedbf98 to fa7b216 Compare July 8, 2026 15:13
@MarcGForgeFlow
MarcGForgeFlow force-pushed the 19.0-mig-crm_lead_to_opportunity_contact branch from fa7b216 to 24b0d7f Compare July 8, 2026 16:10

@DavidJForgeFlow DavidJForgeFlow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review 👍

@MarcGForgeFlow

Copy link
Copy Markdown
Author

@alexis-via I've pushed an [IMP] commit on top of the migration, extending the wizard so an existing contact can also be linked, not only created.

Since it's your module, does the improvement look good to you? Happy to adjust it.

@MarcGForgeFlow
MarcGForgeFlow force-pushed the 19.0-mig-crm_lead_to_opportunity_contact branch from 47cabe5 to 41c2245 Compare July 9, 2026 14:18
@MarcGForgeFlow
MarcGForgeFlow force-pushed the 19.0-mig-crm_lead_to_opportunity_contact branch from 41c2245 to bd918ff Compare July 10, 2026 16:14
…hen it cannot be normalized

Odoo keys partners on the normalized email and falls back to the raw input
when normalization fails, as documented in MailThread._partner_find_from_emails().
The customer of the wizard is looked up through that tool, so it matches leads
carrying a malformed email, while the contact lookup gave up on them.

Apply the same rule to the contact lookup, so that both questions of the
wizard use one single criterion.
The tests create partners. Run at install time, the registry only knows the
fields added by this module's dependencies, while the database holds the
columns of every installed module: a required field added by a module loaded
later, such as purchase_stock.group_rfq, then gets no default and its NOT NULL
constraint rejects the insert.

The tests pass on the OCA CI because only crm and its dependencies are
installed there, but they cannot run on a complete database.

@MarinaAForgeFlow MarinaAForgeFlow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants