[IMP] website_sale_aplicoop: accessibility and responsive polish — phase 8
Quantity control layout: changed from wrapping flex to deliberate two-row
grid so the add-to-cart button sits full-width underneath the stepper,
avoiding accidental line breaks and giving the primary action more pulsing
area. Also removed the /Kg suffix's redundant font rules.
Order card delivery row: reordered to badge-then-date (visually centred),
removed the "Delivery" label, and swapped bg-primary to text-bg-primary for
proper contrast on the home-delivery badge (3.13:1 minimum).
Tooltip translations: moved hardcoded static tooltips from data-bs-title
(untranslatable) to title (QWeb-translatable). Handled the edge case of
"Save Cart" and "Back to Cart" which had translations but no model_terms
reference in the POT, causing the merge to discard them — added the view
reference so translations now apply.
Load-from-history page: added accessibility: a visible status message
("Loading your order…"), a <noscript> fallback with link to the group
order, lang and viewport meta tags, and localised strings for all three
languages. Gave the page a minimal inline style block since it does not
inherit the token system (no website.layout).
Translations: 11 new entries (es/eu/ca) for new/reworded UI strings, plus
two code catalogue entries (products found, Close) that needed the
#. odoo-python comment for _() resolution. Documented the silent-failure
pattern in docs/TRANSLATIONS.md: the POT merge, untranslatable attributes,
and missing code comments.
Tests: 246 passing. Pre-commit: clean.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
162ba0b570
commit
5de7573fba
35 changed files with 2181 additions and 2413 deletions
|
|
@ -3,11 +3,13 @@
|
|||
<data>
|
||||
<!-- Extend portal_my_orders to add group order name and pickup day columns -->
|
||||
<template id="portal_my_orders_extend" inherit_id="sale.portal_my_orders" name="My Orders - Add Group Order Info">
|
||||
<!-- Add column headers for new info -->
|
||||
<!-- Add column headers for new info.
|
||||
There is no "Actions" header here: the matching <td> below is
|
||||
commented out, so declaring it left every row one cell short of
|
||||
its header row and pushed the columns out of alignment. -->
|
||||
<xpath expr="//tr[hasclass('active')]//th[last()]" position="after">
|
||||
<th>Group Order</th>
|
||||
<th>Pickup Day</th>
|
||||
<th class="text-center">Actions</th>
|
||||
<th scope="col">Group Order</th>
|
||||
<th scope="col">Pickup Day</th>
|
||||
</xpath>
|
||||
|
||||
<!-- Add data cells for each order row -->
|
||||
|
|
@ -75,25 +77,30 @@
|
|||
<!-- Group Order Info -->
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<!-- text-bg-primary, not bg-primary: a badge's default white on
|
||||
the primary blue is 3.98:1, under AA. The utility picks a
|
||||
contrasting foreground for whatever the theme colour is.
|
||||
d-block on the notes so their mt-2 actually applies — margins
|
||||
do nothing on an inline span. -->
|
||||
<div class="card-header bg-light">
|
||||
<strong><t t-esc="sale_order.group_order_id.name"/></strong>
|
||||
<t t-if="sale_order.home_delivery">
|
||||
<span class="badge bg-primary">
|
||||
<span class="badge text-bg-primary">
|
||||
<t t-set="day_idx" t-value="(int(sale_order.group_order_id.pickup_day) + 1) % 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="sale_order.group_order_id.delivery_date.strftime('%d/%m/%Y') if sale_order.group_order_id.delivery_date else ''"/>
|
||||
</span>
|
||||
<span class="mt-2 text-muted small">
|
||||
<span class="d-block mt-2 text-muted small">
|
||||
<t t-esc="sale_order.group_order_id.delivery_notice"/>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="badge bg-primary">
|
||||
<span class="badge text-bg-primary">
|
||||
<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="sale_order.pickup_date.strftime('%d/%m/%Y')"/>
|
||||
</span>
|
||||
<span class="mt-2 small">
|
||||
<span class="d-block mt-2 small">
|
||||
<t t-foreach="sale_order.group_order_id.group_ids" t-as="group">
|
||||
<t t-esc="group.name"/>
|
||||
<t t-if="group.street">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue