when switching to Odoo from another system or implementing Odoo, there always comes an opportunity to invite contacts to create a new account.
how to go online with Odoo and efficiently invite contacts to login?
human made "AI" (advises & inputs) forum by Odoo professionals, experts and enthusiasts challenging real use cases with standard solutions!
-> solutions should be applicable for Odoo community or online (at the limit with Studio), all without custom modules.
when switching to Odoo from another system or implementing Odoo, there always comes an opportunity to invite contacts to create a new account.
how to go online with Odoo and efficiently invite contacts to login?
simpler variant, directly from the contact, that:
# Create the portal wizard (it auto-populates user_ids from selected contacts = records)
# Keep only wizard users who do NOT already have a portal user linked
# Grant portal access to each eligible wizard user

portal_wizard = env['portal.wizard'].create({})
for user in portal_wizard.user_ids.filtered(lambda w: not w.partner_id.user_ids.filtered(lambda u: u.has_group('base.group_portal'))):
user.action_grant_access()
records.with_context(create_user=True).action_reset_password()
template = env.ref('auth_signup.mail_template_user_signup_account_created')
for record in records:
template.send_mail(record.id, force_send=True)Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
|
1
Aug 25
|
208 | ||
|
|
2
Mar 26
|
295 | ||
|
|
1
Aug 26
|
331 | ||
|
|
1
Aug 26
|
230 | ||
|
|
1
Aug 26
|
57 |