- Backend: Agregar método _validate_items_for_group_order() para validar que los productos históricos sigan siendo disponibles en la orden de grupo actual - Backend: Modificar load_order_from_history() para filtrar solo items disponibles antes de pasar al template - Backend: Generar mensaje de aviso traducido cuando hay productos no disponibles - Template: Pasar información de productos no disponibles y warnings al JavaScript - Frontend: Mostrar notificación de advertencia si hubo productos excluidos durante la carga histórica - Notas: Esto evita cargar productos que ya no existen en la orden actual debido a cambios en categorías, proveedores o listas negras
37 lines
1.8 KiB
XML
37 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<!-- ==========================================
|
|
DISABLE STANDARD WEBSITE_SALE CART
|
|
Convert /shop to a simple product catalog
|
|
========================================== -->
|
|
|
|
<!-- Hide the cart link from the header -->
|
|
<template id="header_cart_link_hidden" inherit_id="website_sale.header_cart_link" name="Hide Cart Link">
|
|
<xpath expr="//li[hasclass('o_wsale_my_cart')]" position="attributes">
|
|
<attribute name="class" add="d-none" separator=" "/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Remove "Add to Cart" button from product items in the shop -->
|
|
<template id="products_item_no_add_to_cart" inherit_id="website_sale.products_item" name="Product Item Without Add to Cart">
|
|
<!-- Remove the form action that points to /shop/cart/update -->
|
|
<xpath expr="//form[hasclass('oe_product_cart')]" position="attributes">
|
|
<attribute name="action">/</attribute>
|
|
<attribute name="method">get</attribute>
|
|
</xpath>
|
|
<!-- Hide the quick add button area completely -->
|
|
<xpath expr="//div[hasclass('o_wsale_product_btn')]" position="attributes">
|
|
<attribute name="class" add="d-none" separator=" "/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Hide cart suggestion snippets and related cart features -->
|
|
<template id="suggested_products_list_hidden" inherit_id="website_sale.suggested_products_list" name="Hide Suggested Products" active="False">
|
|
<xpath expr="//*[hasclass('js_cart_lines')]" position="attributes">
|
|
<attribute name="class" add="d-none" separator=" "/>
|
|
</xpath>
|
|
</template>
|
|
|
|
</data>
|
|
</odoo>
|