Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][IMP] survey_contact_generation: email case match #120

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions survey_contact_generation/models/survey_user_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def _create_contact_post_process(self, partner):
subtype_id=self.env.ref("mail.mt_note").id,
)

def _get_existing_partner(self, email):
def _get_existing_partner(self, email, limit=1):
"""Hook method that can be used to change the behavior of contact generation"""
return self.env["res.partner"].search([("email", "=", email)], limit=1)
return self.env["res.partner"].search([("email", "=ilike", email)], limit=limit)

def _mark_done(self):
"""Generate the contact when the survey is submitted"""
Expand Down
Loading