requiere login para realizar el checkout, cogido de OCA/e-commnerce

This commit is contained in:
santiky 2022-04-22 19:48:25 +02:00
parent 50f2a6d592
commit d6de99c5aa
Signed by: snt
GPG key ID: A9FD34930EADBE71
23 changed files with 885 additions and 0 deletions

View 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>