Compare commits
No commits in common. "07bd63253783ab12f8825cb637a2b050b6aebc98" and "27097004fb103bf666aebdc164635e4f0e3cea1d" have entirely different histories.
07bd632537
...
27097004fb
3 changed files with 33 additions and 8 deletions
|
|
@ -1,15 +1,18 @@
|
||||||
/* zebra striping for list views in this module (Odoo 18 selectors) */
|
/* zebra striping for list views in this module */
|
||||||
|
|
||||||
table.o_list_table tbody tr.o_data_row:nth-child(even) td {
|
/* Target Odoo list/tree view tables. Use a specific, but broad selector to
|
||||||
|
avoid interfering globally with other modules. */
|
||||||
|
.o_list_view .o_list_view_table tbody tr:nth-child(even) td {
|
||||||
background-color: rgba(0, 0, 0, 0.03);
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.o_list_table tbody tr.o_data_row:hover td {
|
/* Slight hover contrast to improve row focus */
|
||||||
|
.o_list_view .o_list_view_table tbody tr:hover td {
|
||||||
background-color: rgba(0, 0, 0, 0.045);
|
background-color: rgba(0, 0, 0, 0.045);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure field widgets inside striped rows stay transparent */
|
/* Ensure checkboxes / toggle columns maintain contrast */
|
||||||
table.o_list_table tbody tr.o_data_row:nth-child(even) td .o_field_widget,
|
.o_list_view .o_list_view_table tbody tr:nth-child(even) td .o_field_widget,
|
||||||
table.o_list_table tbody tr.o_data_row:nth-child(even) td .o_field_widget * {
|
.o_list_view .o_list_view_table tbody tr:nth-child(even) td .o_field_widget * {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ def _get_pricing_info(
|
||||||
product=product, quantity=quantity, target_currency=currency
|
product=product, quantity=quantity, target_currency=currency
|
||||||
)
|
)
|
||||||
price_before_discount = price
|
price_before_discount = price
|
||||||
pricelist_item = env["product.pricelist.item"].sudo().browse(rule_id)
|
pricelist_item = env["product.pricelist.item"].browse(rule_id)
|
||||||
if pricelist_item and pricelist_item._show_discount_on_shop():
|
if pricelist_item and pricelist_item._show_discount_on_shop():
|
||||||
price_before_discount = pricelist_item._compute_price_before_discount(
|
price_before_discount = pricelist_item._compute_price_before_discount(
|
||||||
product=product,
|
product=product,
|
||||||
|
|
@ -155,7 +155,7 @@ def _get_pricing_info(
|
||||||
fiscal_position = (
|
fiscal_position = (
|
||||||
website.fiscal_position_id.sudo()
|
website.fiscal_position_id.sudo()
|
||||||
if website and getattr(website, "fiscal_position_id", False)
|
if website and getattr(website, "fiscal_position_id", False)
|
||||||
else env["account.fiscal.position"].sudo()
|
else env["account.fiscal.position"]
|
||||||
)
|
)
|
||||||
product_taxes = product.sudo().taxes_id._filter_taxes_by_company(company)
|
product_taxes = product.sudo().taxes_id._filter_taxes_by_company(company)
|
||||||
taxes = fiscal_position.map_tax(product_taxes) if product_taxes else product_taxes
|
taxes = fiscal_position.map_tax(product_taxes) if product_taxes else product_taxes
|
||||||
|
|
|
||||||
|
|
@ -854,6 +854,28 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Home-delivery toggle button (shop sidebar)
|
||||||
|
var homeDeliveryBtn = document.getElementById("home-delivery-btn");
|
||||||
|
if (homeDeliveryBtn) {
|
||||||
|
// Restore persisted preference on page load
|
||||||
|
var storedDelivery = sessionStorage.getItem(
|
||||||
|
"eskaera_is_delivery_" + self.orderId
|
||||||
|
);
|
||||||
|
if (storedDelivery === "true") {
|
||||||
|
homeDeliveryBtn.classList.add("active");
|
||||||
|
}
|
||||||
|
homeDeliveryBtn.addEventListener("click", function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var isNowActive = !homeDeliveryBtn.classList.contains("active");
|
||||||
|
homeDeliveryBtn.classList.toggle("active", isNowActive);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"eskaera_is_delivery_" + self.orderId,
|
||||||
|
isNowActive ? "true" : "false"
|
||||||
|
);
|
||||||
|
console.log("[HOME_DELIVERY_BTN] toggled to:", isNowActive);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Buttons to clear cart (header + footer)
|
// Buttons to clear cart (header + footer)
|
||||||
var clearCartBtns = [
|
var clearCartBtns = [
|
||||||
document.getElementById("clear-cart-btn"),
|
document.getElementById("clear-cart-btn"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue