-
-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] website_sale_suggest_create_account: Upgrade to v9
* Migrate website_sale_suggest_create_account to v9 * Update author to Tecnativa * Update ReadMe issues text to new template
- Loading branch information
Showing
3 changed files
with
48 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 38 additions & 40 deletions
78
website_sale_suggest_create_account/views/website_sale.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<template id="cart" inherit_id="website_sale.cart"> | ||
<!-- Show normal "Checkout" button if user is logged in or external login | ||
is disabled --> | ||
<xpath expr="//a[@href='/shop/checkout']" position="attributes"> | ||
<attribute name="t-if">( | ||
user_id != website.user_id or | ||
env['ir.config_parameter'].get_param( | ||
'auth_signup.allow_uninvited') != 'True' and | ||
not optional_products and website_sale_order and | ||
website_sale_order.website_order_line | ||
)</attribute> | ||
</xpath> | ||
|
||
<!-- Show choice in other cases --> | ||
<xpath expr="//a[@href='/shop/checkout']" position="after"> | ||
<a t-if="user_id == website.user_id" | ||
class="btn btn-primary pull-right mb32" | ||
href="/web/login?redirect=/shop/checkout"> | ||
<span>Log in and checkout</span> | ||
<span class="fa fa-long-arrow-right"/> | ||
</a> | ||
<t t-if="(user_id == website.user_id and | ||
env['ir.config_parameter'].get_param( | ||
'auth_signup.allow_uninvited') == 'True' and | ||
not optional_products and website_sale_order and | ||
website_sale_order.website_order_line)"> | ||
<a class="btn btn-primary pull-right mb32" | ||
href="/web/signup?redirect=/shop/checkout"> | ||
<span>Sign up and checkout</span> | ||
<odoo> | ||
|
||
<template id="cart" inherit_id="website_sale.cart"> | ||
<!-- Show normal "Checkout" button if user is logged in or external login | ||
is disabled --> | ||
<xpath expr="//a[@href='/shop/checkout']" position="attributes"> | ||
<attribute name="t-if">( | ||
user_id != website.user_id or | ||
env['ir.config_parameter'].get_param( | ||
'auth_signup.allow_uninvited') != 'True' and | ||
not optional_products and website_sale_order and | ||
website_sale_order.website_order_line | ||
)</attribute> | ||
</xpath> | ||
|
||
<!-- Show choice in other cases --> | ||
<xpath expr="//a[@href='/shop/checkout']" position="after"> | ||
<a t-if="user_id == website.user_id" | ||
class="btn btn-primary pull-right mb32" | ||
href="/web/login?redirect=/shop/checkout"> | ||
<span>Log in and checkout</span> | ||
<span class="fa fa-long-arrow-right"/> | ||
</a> | ||
<a id="anonymous_checkout" class="btn btn-default mb32" href="/shop/checkout"> | ||
<span>Checkout without sign up</span> | ||
</a> | ||
</t> | ||
</xpath> | ||
</template> | ||
<t t-if="(user_id == website.user_id and | ||
env['ir.config_parameter'].get_param( | ||
'auth_signup.allow_uninvited') == 'True' and | ||
not optional_products and website_sale_order and | ||
website_sale_order.website_order_line)"> | ||
<a class="btn btn-primary pull-right mb32" | ||
href="/web/signup?redirect=/shop/checkout"> | ||
<span>Sign up and checkout</span> | ||
<span class="fa fa-long-arrow-right"/> | ||
</a> | ||
<a id="anonymous_checkout" class="btn btn-default mb32" href="/shop/checkout"> | ||
<span>Checkout without sign up</span> | ||
</a> | ||
</t> | ||
</xpath> | ||
</template> | ||
|
||
</data> | ||
</openerp> | ||
</odoo> |