Skip to content

Commit

Permalink
[MIG] website_sale_suggest_create_account: basic migration v10 to v11
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarolar committed Jan 31, 2018
1 parent 405941d commit e8ae0b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions website_sale_suggest_create_account/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Contributors
* Rafael Blasco <rafabn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>
* Dave Lasley <dave@laslabs.com>
* Oscar Alcala <oscar@vauxoo.com>

Maintainer
----------
Expand Down
2 changes: 1 addition & 1 deletion website_sale_suggest_create_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Suggest to create user account when buying",
"summary": "Suggest users to create an account when buying in the website",
"version": "10.0.1.1.0",
"version": "11.0.1.0.0",
"category": "Website",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, "
Expand Down
7 changes: 3 additions & 4 deletions website_sale_suggest_create_account/views/website_sale.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="cart" inherit_id="website_sale.cart">
<xpath expr="//div[@id='wrap']" position="before">
<t t-set="user_authenticated" t-value="user_id != website.user_id"/>
<t t-set="signup_allowed" t-value="env['ir.config_parameter'].get_param('auth_signup.allow_uninvited') == 'True' "/>
<t t-set="signup_allowed" t-value="env['ir.config_parameter'].sudo().get_param('auth_signup.allow_uninvited') == 'True' "/>
<!-- TODO: optional_products has to be removed since odoo 12.0 at least. See https://github.com/odoo/odoo/pull/21461 -->
<t t-set="can_checkout" t-value="not optional_products
<t t-set="can_checkout" t-value="not optional_products
and website_sale_order and
website_sale_order.website_order_line"/>

Expand All @@ -18,7 +17,7 @@
<xpath expr="//a[@href='/shop/checkout']" position="attributes">
<attribute name="t-if">(user_authenticated or not signup_allowed) and can_checkout</attribute>
</xpath>

<!-- Show choice in other cases -->
<xpath expr="//a[@href='/shop/checkout']" position="after">
<a t-if="not user_authenticated"
Expand Down

0 comments on commit e8ae0b7

Please sign in to comment.