-
-
Notifications
You must be signed in to change notification settings - Fork 726
[15.0][ADD] website_form_partner_specific_user_account #1152
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
base: 15.0
Are you sure you want to change the base?
Conversation
016567c to
bb53c4a
Compare
bb53c4a to
2fe3811
Compare
87d778f to
5f71b73
Compare
5f71b73 to
0972ad5
Compare
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| { | ||
| "name": "Website Form Partner Specific User Account", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a summary here, please.
| website_partner = Partner.search( | ||
| [ | ||
| ("email", "=", email), | ||
| ("website_id", "=", website.id), | ||
| ], | ||
| limit=1, | ||
| ) | ||
| if not website_partner and values.get("partner_name"): | ||
| website_partner = Partner.create( | ||
| { | ||
| "email": email, | ||
| "name": values.get("partner_name"), | ||
| "website_id": website.id, | ||
| } | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please consider adding an option (in website) to make the search and create company-aware (the default should be false)?
This module is intended for use when the “Specific User Account” setting is enabled on a website.
It assigns the current website to partners used by website forms and ensures partner lookup and assignment are restricted to that website.
In standard Odoo, partner resolution from website forms does not consider the current website. When “Specific User Account” is enabled, this may result in a partner from another website being assigned if the same email address exists across multiple websites.
This module addresses this issue.
@qrtl QT6278