[I18N] website_sale_aplicoop: Limpieza de traducciones y etiquetas UI en inglés por defecto

This commit is contained in:
snt 2026-02-26 14:33:44 +01:00
parent c2f9f347b7
commit 9937e987f4
12 changed files with 215 additions and 290877 deletions

View file

@ -332,5 +332,5 @@ For issues, feature requests, or contributions:
**Version:** 18.0.1.3.1
**Odoo:** 18.0+
**License:** AGPL-3
**Maintainer:** Criptomart SL
**Repository:** https://git.criptomart.net/KideKoop/kidekoop/odoo-addons
**Maintainer:** Criptomart
**Repository:** https://git.criptomart.net/criptomart/addons-cm

View file

@ -3,17 +3,17 @@
<!-- License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) -->
<odoo>
<data noupdate="0">
<!-- Ribbon: Out of Stock (Sin Stock) -->
<!-- Ribbon: Out of Stock -->
<record id="out_of_stock_ribbon" model="product.ribbon">
<field name="name">Sin Stock</field>
<field name="name">Out of Stock</field>
<field name="position">left</field>
<field name="text_color">#FFFFFF</field>
<field name="bg_color">#d9534f</field>
</record>
<!-- Ribbon: Low Stock (Pocas Existencias) -->
<!-- Ribbon: Low Stock -->
<record id="low_stock_ribbon" model="product.ribbon">
<field name="name">Pocas Existencias</field>
<field name="name">Low Stock</field>
<field name="position">left</field>
<field name="text_color">#FFFFFF</field>
<field name="bg_color">#ffc107</field>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -138,6 +138,43 @@
// Use the global function from checkout_labels.js
if (typeof window.renderCheckoutSummary === "function") {
window.renderCheckoutSummary();
// Vincular botón Entrega a Casa en carrito (shop)
var homeDeliveryBtn = document.getElementById("home-delivery-btn");
if (homeDeliveryBtn) {
homeDeliveryBtn.addEventListener("click", function () {
// Simular click en checkbox de checkout si existe
if (checkbox) {
checkbox.checked = !checkbox.checked;
var event = new Event("change", { bubbles: true });
checkbox.dispatchEvent(event);
} else {
// Alternar home delivery en localStorage/cart
// Aquí puedes implementar lógica para shop
console.log("[HomeDelivery] Toggle home delivery from cart header");
// TODO: Actualizar carrito y mostrar info
}
});
}
}
// Cargar borrador automáticamente al entrar en shop
var cartPage = document.querySelector(".eskaera-shop-page");
if (cartPage) {
var orderId = cartPage.getAttribute("data-order-id") || this.orderId;
var cartKey = "eskaera_" + orderId + "_cart";
var savedCart = localStorage.getItem(cartKey);
if (savedCart) {
try {
var cart = JSON.parse(savedCart);
var event = new CustomEvent("cartLoaded", { detail: { cart: cart } });
document.dispatchEvent(event);
console.log("[SHOP AUTO-LOAD] Cart loaded from localStorage");
} catch (e) {
console.error("[SHOP AUTO-LOAD] Error parsing cart:", e);
}
} else {
console.log("[SHOP AUTO-LOAD] No cart found in localStorage");
}
}
}, 50);
},

View file

@ -80,13 +80,13 @@
<group string="Delivery">
<field name="delivery_notice" placeholder="Information about home delivery..." nolabel="1"/>
</group>
<group string="Catálogo de Productos">
<group string="Productos Incluidos" col="2">
<group string="Product Catalog">
<group string="Included Products" col="2">
<field name="supplier_ids" widget="many2many_tags" help="All products from these suppliers will be included"/>
<field name="category_ids" widget="many2many_tags" help="All products in these categories (including subcategories) will be included"/>
<field name="product_ids" widget="many2many_tags" help="Specific products to include directly"/>
</group>
<group string="Productos Excluidos" col="2">
<group string="Excluded Products" col="2">
<field name="excluded_supplier_ids" widget="many2many_tags" help="Suppliers excluded from this order. Products with these suppliers as main seller will not be available (blacklist has absolute priority)"/>
<field name="excluded_category_ids" widget="many2many_tags" help="Categories excluded from this order. Products in these categories and all their subcategories will not be available (blacklist has absolute priority)"/>
<field name="excluded_product_ids" widget="many2many_tags" help="Products explicitly excluded from this order (blacklist has absolute priority over inclusions)"/>

View file

@ -619,33 +619,26 @@
>
<h6 class="mb-0 cart-title-sm" id="cart-title">My Cart</h6>
<div class="btn-group cart-btn-group gap-0" role="group">
<button type="button" class="btn btn-primary cart-btn-compact" id="save-cart-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Save Cart" data-bs-toggle="tooltip">
<i class="fa fa-save cart-icon-size" />
</button>
<button
type="button"
class="btn btn-info cart-btn-compact"
id="reload-cart-btn"
t-attf-data-order-id="{{ group_order.id }}"
data-bs-title="Reload Cart"
data-bs-toggle="tooltip"
>
<i
class="fa fa-refresh cart-icon-size"
/>
</button>
<a
<!-- Botón Entrega a Casa -->
<button type="button" class="btn btn-warning cart-btn-compact" id="home-delivery-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Home Delivery" data-bs-toggle="tooltip">
<i class="fa fa-truck cart-icon-size" />
</button>
<button type="button" class="btn btn-primary cart-btn-compact" id="save-cart-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Save Cart" data-bs-toggle="tooltip">
<i class="fa fa-save cart-icon-size" />
</button>
<!-- Botón Entrega a Casa -->
<button type="button" class="btn btn-warning cart-btn-compact" id="home-delivery-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Home Delivery" data-bs-toggle="tooltip">
<i class="fa fa-truck cart-icon-size" />
</button>
<a
t-attf-href="/eskaera/{{ group_order.id }}/checkout"
class="btn btn-success cart-btn-compact"
aria-label="Proceed to checkout"
data-bs-title="Proceed to Checkout"
data-bs-toggle="tooltip"
>
<i
class="fa fa-check cart-icon-size"
aria-hidden="true"
/>
</a>
<i class="fa fa-check cart-icon-size" aria-hidden="true" />
</a>
</div>
</div>
<div class="card-body cart-body-lg" id="cart-items-container" t-attf-data-order-id="{{ group_order.id }}" aria-labelledby="cart-title" aria-live="polite" aria-relevant="additions removals">
@ -751,117 +744,47 @@
</div>
<!-- Order Info Card -->
<div
class="order-info-card card border-0 shadow-sm mb-4"
>
<div class="order-info-card card border-0 shadow-sm mb-4">
<div class="card-body">
<div class="row mb-4">
<div class="col-md-4">
<div class="info-item">
<label
t-att-class="'info-label'"
>Cutoff Day</label>
<t
t-if="group_order.cutoff_day and group_order.cutoff_date"
>
<span
class="info-value"
>
<t
t-esc="day_names[int(group_order.cutoff_day) % 7]"
/>
<span
class="info-date"
>(<t
t-esc="group_order.cutoff_date.strftime('%d/%m/%Y')"
/>)</span>
<label t-att-class="'info-label'">Cutoff Day</label>
<t t-if="group_order.cutoff_day and group_order.cutoff_date">
<span class="info-value">
<t t-esc="day_names[int(group_order.cutoff_day) % 7]" />
<span class="info-date">(<t t-esc="group_order.cutoff_date.strftime('%d/%m/%Y')" />)</span>
</span>
</t>
<t t-else="1">
<span
t-att-class="'text-muted small'"
>Not configured</span>
<span t-att-class="'text-muted small'">Not configured</span>
</t>
</div>
</div>
<div class="col-md-4">
<div class="info-item">
<t
t-if="group_order.pickup_day and group_order.pickup_date"
>
<label
t-att-class="'info-label'"
>Store Pickup Day</label>
<span
class="info-value"
t-attf-data-pickup-date="{{ group_order.pickup_date }}"
t-attf-data-delivery-date="{{ group_order.delivery_date }}"
>
<t
t-esc="day_names[int(group_order.pickup_day) % 7]"
/>
<span
class="info-date"
>(<t
t-esc="group_order.pickup_date.strftime('%d/%m/%Y')"
/>)</span>
<t t-if="group_order.pickup_day and group_order.pickup_date">
<label t-att-class="'info-label'">Store Pickup Day</label>
<span class="info-value" t-attf-data-pickup-date="{{ group_order.pickup_date }}" t-attf-data-delivery-date="{{ group_order.delivery_date }}">
<t t-esc="day_names[int(group_order.pickup_day) % 7]" />
<span class="info-date">(<t t-esc="group_order.pickup_date.strftime('%d/%m/%Y')" />)</span>
</span>
</t>
</div>
</div>
<div class="col-md-4">
<div class="info-item">
<t
t-if="group_order.delivery_date and group_order.home_delivery"
>
<label
t-att-class="'info-label'"
>Home Delivery Day</label>
<span
class="info-value"
>
<t
t-esc="day_names[group_order.delivery_date.weekday()]"
/>
<span
class="info-date"
>(<t
t-esc="group_order.delivery_date.strftime('%d/%m/%Y')"
/>)</span>
<t t-if="group_order.delivery_date and group_order.home_delivery">
<label t-att-class="'info-label'">Home Delivery Day</label>
<span class="info-value">
<t t-esc="day_names[group_order.delivery_date.weekday()]" />
<span class="info-date">(<t t-esc="group_order.delivery_date.strftime('%d/%m/%Y')" />)</span>
</span>
</t>
</div>
</div>
</div>
<hr class="my-2" />
<div class="row">
<div
class="col-md-6 text-muted small help-text-sm"
>
<i
class="fa fa-info-circle"
aria-hidden="true"
t-translation="off"
/>
<span
>Save your order as a draft before confirming to make final changes if needed.</span>
</div>
<div class="col-md-6 text-end">
<button
class="btn btn-outline-primary save-order-btn-styled"
id="save-order-btn"
t-attf-data-order-id="{{ group_order.id }}"
aria-label="Save order as draft"
>
<i
class="fa fa-save save-icon-size"
aria-hidden="true"
t-translation="off"
/>
<span>Save as Draft</span>
</button>
</div>
</div>
</div>
</div>
@ -943,25 +866,11 @@
t-translation="off"
/>
<span class="fw-bold">
<t
t-if="request.env.context.get('lang') == 'eu_ES' or request.env.context.get('lang') == 'eu'"
>Garrantzitsua</t>
<t
t-elif="request.env.context.get('lang') == 'es_ES' or request.env.context.get('lang') == 'es'"
>Importante</t>
<t t-else="">Important</t>
<t t-esc="_('Important')"/>
</span>:
</div>
<p>
<t
t-if="request.env.context.get('lang') == 'eu_ES' or request.env.context.get('lang') == 'eu'"
>Behin eskaera hau berretsi ondoren, ezin izango duzu aldatu. Mesedez, arretaz berrikusi berretsi aurretik.</t>
<t
t-elif="request.env.context.get('lang') == 'es_ES' or request.env.context.get('lang') == 'es'"
>Una vez confirmes este pedido, no podrás modificarlo. Por favor, revisa cuidadosamente antes de confirmar.</t>
<t
t-else=""
>Once you confirm this order, you will not be able to modify it. Please review carefully before confirming.</t>
<t t-esc="_('Once you confirm this order, you will not be able to modify it. Please review carefully before confirming.')"/>
</p>
<button
type="button"
@ -973,10 +882,10 @@
<!-- Action Buttons -->
<div class="checkout-actions d-grid gap-3" id="checkout-form-labels">
<button class="btn btn-success btn-lg" id="confirm-order-btn" t-attf-data-order-id="{{ group_order.id }}" data-confirmed-label="Order confirmed" data-pickup-label="Pickup Day" aria-label="Confirm and send order" data-bs-title="Confirm Order" data-bs-toggle="tooltip">
<i class="fa fa-check-circle" aria-hidden="true" t-translation="off" />
<span>Confirm Order</span>
</button>
<button class="btn btn-success btn-lg" id="confirm-order-btn" t-attf-data-order-id="{{ group_order.id }}" data-confirmed-label="Order saved as draft" data-pickup-label="Pickup Day" aria-label="Save order as draft" data-bs-title="Save Draft" data-bs-toggle="tooltip">
<i class="fa fa-save" aria-hidden="true" t-translation="off" />
<span>Save Draft</span>
</button>
<a t-attf-href="/eskaera/{{ group_order.id }}" class="btn btn-outline-secondary btn-lg" aria-label="Back to cart page" data-bs-title="Back to Cart" data-bs-toggle="tooltip">
<i class="fa fa-arrow-left" aria-hidden="true" t-translation="off" />
<span>Back to Cart</span>