Skip to content
Snippets Groups Projects
Commit 1bcaaaff authored by Swapnesh Shah's avatar Swapnesh Shah Committed by GitHub
Browse files

[FIX] website_sale: check invitation scope based on website


Try to Reproduce the Issue:

Enable Multi Website
    My Website: Set `On invitation` (b2b) under Website settings. -- It will set `auth_signup.invitation_scope` to b2b
    My Website2 : Set `Free sign up` (b2c) under Website settings. -- It will set `auth_signup.invitation_scope` to b2c

Place a Guest Order for Website one.
`Sign Up` button will be visible as current Implementation is checking for ICP only.

With this commit, We are checking Invitation Scope based on the Current Website.

Fixes #50964

closes odoo/odoo#51037

X-original-commit: 608e8b4c
Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
parent 8376fd1b
No related branches found
No related tags found
No related merge requests found
......@@ -1504,7 +1504,7 @@
</h2>
</div>
</t>
<t t-if="request.env['ir.config_parameter'].sudo().get_param('auth_signup.invitation_scope', 'b2b') == 'b2c' and request.website.is_public_user()">
<t t-if="request.env['res.users']._get_signup_invitation_scope() == 'b2c' and request.website.is_public_user()">
<p class="alert alert-info mt-3" role="status">
<a role="button" t-att-href='order.partner_id.signup_prepare() and order.partner_id.with_context(relative_url=True).signup_url' class='btn btn-primary'>Sign Up</a>
to follow your order.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment