requiere login para realizar el checkout, cogido de OCA/e-commnerce
This commit is contained in:
parent
50f2a6d592
commit
d6de99c5aa
23 changed files with 885 additions and 0 deletions
25
website_sale_require_login/views/website_sale.xml
Normal file
25
website_sale_require_login/views/website_sale.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2015 Antiun Ingeniería S.L. - Jairo Llopis
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<template id="cart" inherit_id="website_sale.cart" priority="20">
|
||||
<xpath expr="//div[@id='wrap']" position="before">
|
||||
<t t-set="hide_checkout_button" t-value="not (user_authenticated and can_checkout)" />
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('oe_cart')]//a[@href='/shop/checkout?express=1']" position="attributes">
|
||||
<attribute name="t-if">not hide_checkout_button</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('col-12','col-xl-4')]//a[@href='/shop/checkout?express=1']" position="attributes">
|
||||
<attribute name="t-if">not hide_checkout_button</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="short_cart_summary" inherit_id="website_sale.short_cart_summary">
|
||||
<xpath expr="//a[@href='/shop/checkout?express=1']" position="attributes">
|
||||
<attribute name="t-if">not hide_checkout_button</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue