summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2020-05-09 15:55:47 +0000
committerGitHub <noreply@github.com>2020-05-11 13:04:12 +0000
commit1bcaaaff7c2175a1f36c8b13da9dbb21b719d3ba (patch)
tree03ae921d57458b97c001eb60208957bf8e6c6869
parent8376fd1b3e1cf9716cc38cc8e18475120e3ac2cf (diff)
[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: 608e8b4c4a11b569cf3ad7e7586c731bad108afa Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
-rw-r--r--addons/website_sale/views/templates.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index be1b318b30a..2ed0db774de 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -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.