disable load in cart portal buttons

This commit is contained in:
GitHub Copilot 2026-05-21 13:50:50 +02:00
parent 4ea0286b52
commit d3d1231d29

View file

@ -31,16 +31,16 @@
</t> </t>
</td> </td>
<!-- Action buttons --> <!-- Action buttons disabled
<td class="text-center"> <td class="text-center">
<t t-if="order.group_order_id"> <t t-if="order.group_order_id">
<!-- Load in Cart button: available for all states -->
<a t-attf-href="/eskaera/#{order.group_order_id.id}/load-from-history/#{order.id}" <a t-attf-href="/eskaera/#{order.group_order_id.id}/load-from-history/#{order.id}"
class="btn btn-sm btn-primary me-1" class="btn btn-sm btn-primary me-1"
t-att-title="'Load order items into cart' if order.state == 'draft' else 'Create new order from this one'"> t-att-title="'Load order items into cart' if order.state == 'draft' else 'Create new order from this one'">
<i class="fa fa-cart-arrow-down"></i> <i class="fa fa-cart-arrow-down"></i>
</a> </a>
<!-- Confirm button: only for draft orders -->
<t t-if="order.state == 'draft'"> <t t-if="order.state == 'draft'">
<a t-attf-href="/eskaera/#{order.group_order_id.id}/checkout" <a t-attf-href="/eskaera/#{order.group_order_id.id}/checkout"
class="btn btn-sm btn-success" class="btn btn-sm btn-success"
@ -49,11 +49,12 @@
</a> </a>
</t> </t>
</t> </t>
</td> </td> -->
</xpath> </xpath>
</template> </template>
<!-- Add Load in Cart button to sidebar --> <!-- Add Load in Cart button to sidebar -->
<!-- deshabilitado, da problemas en la recarga con productos no disponibles y cambios de precios
<template id="portal_order_page_sidebar_button" inherit_id="sale.sale_order_portal_template" name="Order Page - Add Load in Cart Button"> <template id="portal_order_page_sidebar_button" inherit_id="sale.sale_order_portal_template" name="Order Page - Add Load in Cart Button">
<xpath expr="//div[@id='sale_order_sidebar_button']" position="inside"> <xpath expr="//div[@id='sale_order_sidebar_button']" position="inside">
<t t-if="sale_order.group_order_id"> <t t-if="sale_order.group_order_id">
@ -64,8 +65,7 @@
</a> </a>
</t> </t>
</xpath> </xpath>
</template> </template> -->
<!-- Custom portal content template with group order info --> <!-- Custom portal content template with group order info -->
<template id="sale_order_portal_content_aplicoop" inherit_id="sale.sale_order_portal_content" name="Sale Order Portal Content - Aplicoop"> <template id="sale_order_portal_content_aplicoop" inherit_id="sale.sale_order_portal_content" name="Sale Order Portal Content - Aplicoop">
<!-- Insert group order info BEFORE the products table --> <!-- Insert group order info BEFORE the products table -->
@ -89,14 +89,9 @@
</t> </t>
<t t-else=""> <t t-else="">
<span class="badge bg-primary"> <span class="badge bg-primary">
<t t-if="sale_order.pickup_slot_label">
<t t-esc="sale_order.pickup_slot_label"/>
</t>
<t t-else="">
<t t-set="day_idx" t-value="int(sale_order.group_order_id.pickup_day) % 7 if sale_order.group_order_id.pickup_day else 0"/> <t t-set="day_idx" t-value="int(sale_order.group_order_id.pickup_day) % 7 if sale_order.group_order_id.pickup_day else 0"/>
<t t-esc="day_names[day_idx] if day_names else ''"/>, <t t-esc="day_names[day_idx] if day_names else ''"/>,
<t t-esc="sale_order.pickup_date.strftime('%d/%m/%Y')"/> <t t-esc="sale_order.pickup_date.strftime('%d/%m/%Y')"/>
</t>
</span> </span>
<span class="mt-2 small"> <span class="mt-2 small">
<t t-foreach="sale_order.group_order_id.group_ids" t-as="group"> <t t-foreach="sale_order.group_order_id.group_ids" t-as="group">