Commit graph

414 commits

Author SHA1 Message Date
GitHub Copilot
20311740a2 limpieza addon oca 2026-08-07 16:51:42 +02:00
GitHub Copilot
40b9126eee borrado addon OCA 2026-08-07 16:47:22 +02:00
GitHub Copilot
aae6b6096e movidas openspec a /docs 2026-08-07 16:46:33 +02:00
GitHub Copilot
0ef0c9951c limpieza addons OCA 2026-08-07 16:43:27 +02:00
GitHub Copilot
42da5ed3db acción de servidor para crear mandatos bancarios en lote 2026-08-07 16:38:15 +02:00
GitHub Copilot
65818b0155 addons portados en el repo de ecocentral 2026-08-07 16:34:38 +02:00
GitHub Copilot
f2194c5367 [ADD] website_sale_disable_cart: extract cart restriction from website_sale_aplicoop
The "shop as a read-only catalog" behaviour lived inside website_sale_aplicoop,
so every site that wanted the eskaera flow also lost the standard cart. It now
ships as its own installable addon, with the redirect target configurable
instead of hardcoded to /eskaera.

- website_sale_disable_cart: hides the cart UI (12 header styles + the product
  card quick-add) and overrides the standard cart endpoints. Redirect URL is
  configurable in Website settings (default /shop); only site-internal paths are
  accepted, so a misconfigured value cannot turn the shop into an open redirect
  nor loop back into a disabled route.
- Fixes carried over from the original code: /shop/cart/quantity is the Odoo 18
  path (it was /shop/cart_quantity, which never matched), the boxed, sidebar and
  sales two/three/four headers were not covered (the cart link stayed visible on
  them), and the routes now override the standard methods instead of registering
  duplicate ones.
- website_sale_aplicoop 18.0.1.12.0: drops the view file and the four redirect
  routes; installing it no longer touches the standard shop.

Upgrade order matters: update website_sale_aplicoop first, then install
website_sale_disable_cart in a second Odoo run — both use the same XPaths and
obsolete records are only cleaned up at the end of a run.

Tests: 8/8 in website_sale_disable_cart, aplicoop unaffected (its 2 failures
predate this change). Verified live on a DB clone: /shop/cart returns 303 to the
configured URL and no cart markup remains on /shop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 11:34:59 +02:00
GitHub Copilot
73660ee226 Revert "[FIX] l10n_es_edi_tbai_reagyp_recibidas: fix chaining within same invoice series"
This reverts commit 8bf9779d98.
2026-07-31 19:11:49 +02:00
GitHub Copilot
f14aab003a quita línea de traducciones obligatorias en el repo, sólo era aplicable
a website_sale_aplicoop
2026-07-31 18:54:57 +02:00
GitHub Copilot
df1a9f589a limpia personalizaciones individuales 2026-07-31 18:52:19 +02:00
GitHub Copilot
8bf9779d98 [FIX] l10n_es_edi_tbai_reagyp_recibidas: fix chaining within same invoice series
TicketBAI maintains independent chains per invoice series (INV, RINV, etc).
When building the chain for a new invoice, ensure it links to the previous
valid document from the same series, not just the last document regardless
of series.

Fixes error "time data '' does not match format '%d-%m-%Y'" when previous
document's XML is missing or when wrong series document is used for chaining.

- Override _get_sale_values to validate series match
- Add _get_last_chained_document_by_series to filter by series+state+xml
- Skip cancelled documents and documents without valid XML

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-31 18:48:58 +02:00
GitHub Copilot
5a6d9c9894 [FIX] website_sale_aplicoop: precio por kg/litro con IVA y granel por litro
El precio por unidad de las tarjetas usaba el campo nativo base_unit_price
(list_price sin impuestos), mostrando un importe distinto al precio
principal de la tarjeta, que sí incluye IVA. Ahora se calcula a partir del
precio ya impositado. Además se extiende el sufijo de precio por unidad
("/L") a productos vendidos por litro, que ya tenían el step de 0.1 pero
no el indicador visual.
2026-07-31 18:48:58 +02:00
31d53c428c add website_membership_associate 2026-07-28 09:29:14 +02:00
40d7cc8772 website_membership_signup_required: fix reset_password form 2026-07-27 11:25:19 +02:00
c439607ce1 website_membership_signup_required: fix token signup name fields 2026-07-23 18:40:29 +02:00
ba52c72b78 website_membership_signup_required: accept terms & conditions in signup form. Redirect to cart 2026-07-22 17:43:11 +02:00
GitHub Copilot
07b0e546c4 [IMP] stock_picking_batch_custom: allow deleting operator lines, show picking reference
Allow removing stock.move.line records from the Basket Assembly operator
view (select + Delete action) instead of forcing quantity to zero, which
caused issues for operators. Also expose the picking reference field
(hidden by default) before the contact column.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 16:26:14 +02:00
GitHub Copilot
aba22fd230 [IMP] website_sale_aplicoop: automate non-weekly group order cycles
One-time, biweekly and monthly group orders now follow the same cron
confirmation flow as weekly ones (confirm sale orders + batch pickings
when the cycle cutoff passes):

- Biweekly/monthly keep the cutoff_day/pickup_day weekday scheme on a
  recurrence grid anchored at start_date (creation date as fallback):
  cutoffs advance +14 days / +1 month snapped to cutoff_day, with
  catch-up after cron downtime. Previously they behaved as weekly.
- One-time orders (specials/promotions) are driven by end_date
  (cutoff_date = end_date); once passed, the cron confirms, batches
  and closes the group order.
- end_date keeps its "empty = permanent" meaning for recurring orders.
- Website draft-cart lookup window is now period-aware instead of
  assuming a 6-day weekly cycle.
- New cron tests for once/biweekly/monthly cycles; i18n es/eu updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 16:26:14 +02:00
d8cd83bdaf #2 #3 add membership_payment_date: membership start date -> payment date. Don't overlap membership periods on renewals 2026-07-14 11:56:57 +02:00
54965d483f website_membership_signup_required: phone not required 2026-07-14 11:53:52 +02:00
c4d32c6add add website_membership_signup_required: force to create user before add to cart a membership product 2026-07-07 10:28:05 +02:00
GitHub Copilot
80f24bcc46 paso a pos.sessions más natural, los apuntes están ahí. 2026-06-26 19:57:07 +02:00
GitHub Copilot
62e0e8a92c crea mandatos SEPA desde pedidos del TPV 2026-06-26 19:42:45 +02:00
a754df3914 Ecocentral/ecocentral#172: migrate purchase_rappel to 18.0 2026-06-23 14:30:03 +02:00
GitHub Copilot
1d6747e703 [IMP] website_sale_aplicoop: filter and cap stock using forecasted net qty
Group orders are not confirmed until the cutoff date, so draft/sent
sale.order lines never generate stock.moves and are invisible to
virtual_available. This change makes the shop aware of that demand.

- group.order._compute_draft_sale_demand: queries sale.order.line in
  draft/sent state (mirroring sale_stock forecasted report logic) and
  returns pending demand per product.id in the product's own UoM.
- _get_products_for_group_order: delegates to new _apply_stock_filter_and_sort
  which excludes storable products whose forecasted net qty
  (virtual_available − draft demand) <= 0, unless allow_out_of_stock_order.
- _compute_stock_ribbons: reads draft_demand_by_product from ORM context
  so is_out_of_stock / is_low_stock / dynamic_ribbon_id reflect net qty.
- Controller: new _prepare_draft_stock_data helper calculates demand once
  per request, injects context, and builds product_max_qty dict. Applied
  in eskaera_shop, load_eskaera_page and load_products_ajax.
- Template: qty input gets max and data-max-qty from product_max_qty.
- JS: blocks add-to-cart if requested quantity exceeds data-max-qty.
- Fixes type check: type=='consu' → is_storable=True (Odoo 18 semantics).
- 21 new tests in test_forecasted_stock.py covering demand calculation,
  ribbon logic with context, and group order filtering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 18:18:40 +02:00
GitHub Copilot
b484e3dc2e [ADD] product_sale_price_from_pricelist: server action to bulk-correct purchase price from supplierinfo
- Add action_sync_purchase_price_from_supplierinfo on product.template:
  iterates variants, applies discount chain from main supplierinfo
  (according to last_purchase_price_compute_type), writes net price to
  last_purchase_price_received, recomputes theoretical sale price.
  Skips manual_update variants and products without a supplier.
  Returns a display_notification with updated/skipped counts.
- Register it as ir.actions.server bound to product.template list view.
- Add test_sync_action.py: 10 tests covering all discount types, skip
  cases, theoretical price recompute, notification type, idempotency,
  and bulk multi-template execution.
- Fix test_no_update_with_zero_quantity: update assertion to reflect that
  PO confirmation now syncs the cost via supplierinfo (intended behavior).
2026-06-12 16:30:15 +02:00
GitHub Copilot
9484f8c349 [FIX] website_sale_aplicoop: split cart and cycle stamp in localStorage
965c5c2 stored the cart as {cutoff_date, items: {...}} in
eskaera_<id>_cart. That broke every other reader of the same key:

- checkout_labels.js iterates Object.keys() expecting product IDs and
  rendered "cutoff_date" / "items" as ghost rows → users on the
  checkout page saw their cart as empty.
- home_delivery.js read/wrote the cart in place; the in-place mutation
  destroyed the wrapper.
- _saveOrderDraft serialised the same object straight to the server,
  POSTing "cutoff_date" and "items" as productIds.

Split the schema: eskaera_<id>_cart keeps the plain {productId: {...}}
shape every other JS file already relies on; the cycle marker moves to
eskaera_<id>_cart_cycle. _loadCart migrates browsers still holding the
v18.0.1.10.0 wrapped value on the next read.

Also make eviction strictly opt-in: drop the cart only when we know
the current cycle AND the stored cycle disagrees. Missing data on
either side (check-status didn't run, XHR failed) → preserve. This
restores the checkout page where check-status isn't called.

Version bump triggers the in-tab auto-reload added in 6e6d1e5 for
clients already on that build.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 15:37:55 +02:00
GitHub Copilot
6e6d1e5256 [IMP] website_sale_aplicoop: signal frontend to reload on deploy
When we ship a JS-only fix, users with a long-lived tab keep running
the old code until they hard-refresh — there is no clean way to push
new code to an already-loaded page. Now /eskaera/check-status returns
the module's installed_version as client_version, and the eskaera
page embeds the same version in data-build-version on the cart
container. The JS captures the page's build version at init; on every
check-status response it compares them and triggers window.location.
reload() on mismatch. A sessionStorage timestamp guards against
reload loops if the versions stay disagreeing (cached HTML upstream).

The version bump in __manifest__.py also invalidates the asset bundle
URL hash, so even users without this signalling path get fresh JS on
their next navigation.

This is forward-looking: clients on the old JS (no check) still need
one manual refresh today, but every future deploy will auto-recover.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 15:31:37 +02:00
GitHub Copilot
bd8d87060f Bump version 2026-06-04 15:22:19 +02:00
GitHub Copilot
48597ae8c7 add l10n_es_partner dependency for commercial name field. 2026-06-04 15:14:53 +02:00
GitHub Copilot
965c5c2495 [FIX] website_sale_aplicoop: stamp localStorage cart with cycle and evict on rollover
The cart was reappearing on stage with ghost items that had never been
saved as drafts on the server. Root cause: the localStorage cart had no
cycle awareness. Users who added items but never clicked Save left the
items in localStorage forever, and the only existing eviction path
(_clearCurrentOrderCartSilently via _checkGroupOrderStatus) only fires
when cutoff_passed flips true — which it rarely does, because the
stored cutoff_date is normally in the future for an active cycle. On
the next visit, _loadCart happily rehydrated the stale items and
_autoLoadDraftOnInit short-circuited because the cart was no longer
empty.

Stamp every cart written to localStorage with the cutoff_date it
belongs to and reject on cycle mismatch in _loadCart. The cutoff_date
is captured from /eskaera/check-status (which already returned it).
Legacy unstamped values and corrupt JSON are also dropped, so existing
browsers self-heal on first reload after the deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 15:14:04 +02:00
GitHub Copilot
9a9139711f change order in basket assembly view 2026-06-04 13:53:16 +02:00
GitHub Copilot
d35c3383b2 [FIX] product_sale_price_from_pricelist: apply supplier discounts from supplierinfo
The sale price was computed from a gross last_purchase_price_received when
the product relied on its supplierinfo (no stock receipt), ignoring the
vendor discounts even with last_purchase_price_compute_type set.

Sync last_purchase_price_received from the main vendor's supplierinfo on
create/write, applying its discounts according to compute_type (mirrors the
stock.move receipt logic): without_discounts keeps the gross price, with_*
discounts apply 1/2/all three, manual_update is left untouched. The
theoretical price is refreshed (and last_purchase_price_updated flagged)
without overwriting lst_price until the user confirms.

Also drop the redundant _compute_price_rule call in _compute_theoritical_price
by asking the pricelist for the price directly instead of going through
_get_price (which computed the price twice).

Add purchase_triple_discount as an explicit dependency and tests covering
every discount type, manual_update, write re-sync and the main-vendor rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:51:48 +02:00
GitHub Copilot
9a7dfe02db [ADD] Claude Code ecosystem adapted from Copilot config
Port .github Copilot setup to Claude Code:
- CLAUDE.md: condensed project instructions (auto-loaded each session)
- .claude/skills: per-language guides (odoo-python, odoo-xml-views,
  odoo-qweb-html, odoo-javascript) + openspec-* workflow skills
- .claude/commands/opsx: /opsx:explore|propose|apply|archive slash commands

Original .github/ files kept untouched as extended reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:29:10 +02:00
GitHub Copilot
8798f321b3 create monthly recurring membership lines 2026-06-02 14:22:13 +02:00
a0ba3426c8 fix comercial name in supplier info 2026-06-02 10:50:36 +00:00
GitHub Copilot
87dcb4e350 cron better exception management. show supplier commercial name in product card template. linters config 2026-06-02 10:43:54 +02:00
GitHub Copilot
a812b4385d [IMP] stock_picking_batch_custom: rename operator view button to Basket Assembly
Add es/eu translations: Montaje de Cestas / Saskien Prestaketa.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 19:43:16 +02:00
GitHub Copilot
be7f379c1e [FIX] stock_picking_batch_custom: fix is_collected toggle clipping in operator view
Replace transform: scale() (which clips at parent boundaries) with direct
width/height on the form-check-input element so the switch grows without overflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 19:37:09 +02:00
GitHub Copilot
f5ba2d786c [FIX] stock_picking_batch_custom: fix CSS specificity for quantity font-size in operator view
The general tbody tr.o_data_row td rule had higher specificity (0,3,2) than
td[name="quantity"] (0,2,1), overriding the 1.5rem font-size. Fixed by using
tbody tr.o_data_row td[name="quantity"] (0,3,3) for the size/weight override.
Also fixed table. prefix on all selectors: arch class lands on the controller
root div, not the <table> element.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 19:32:34 +02:00
GitHub Copilot
483c4ad5a7 [FIX] stock_picking_batch_custom: apply quantity font size/weight to td directly
In read mode the value is plain text inside <td name="quantity"> with no
widget wrapper, so font-size and font-weight must target the td itself,
not only .o_field_widget input (edit mode only).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 19:04:20 +02:00
GitHub Copilot
591dd5f2b2 [IMP] stock_picking_batch_custom: larger bold quantity in operator view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 18:53:22 +02:00
GitHub Copilot
a9a14e7db5 [IMP] stock_picking_batch_custom: add full-screen operator view for batch picking
Add a "Vista Operarios" button in the batch form header (visible when
in_progress) that opens a full-screen list of stock.move.line filtered
by the current batch. The view shows only the fields operators need
(category, product, partner, home_delivery, consumer_group, collected,
quantity) with larger rows and touch-friendly quantity input via CSS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 18:30:46 +02:00
GitHub Copilot
c8e0461120 [IMP] website_sale_aplicoop: render user-defined website_sale ribbon alongside stock ribbon
Eskaera shop cards now display the standard website_sale ribbon
(variant_ribbon_id or website_ribbon_id, e.g. "Novedad") in addition
to the dynamic stock ribbon. Stock ribbons move to the right so they
coexist with user-defined ribbons (which default to the left).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 18:11:47 +02:00
GitHub Copilot
3b8cb7582b [FIX] website_sale_aplicoop: scope draft lookup to active cycle window
The /eskaera/load-draft endpoint was returning previous-cycle drafts when
group_order.cutoff_date was still in the future but group_order.pickup_date
had not yet been recomputed (its compute only depends on pickup_day and
start_date). Both the stale group_order.pickup_date and the old draft's
pickup_date held the same past value, so the exact-pickup-date filter in
_find_recent_draft_order matched the stale draft and the cart was
repopulated with old products immediately after being cleared.

Replace the pickup_date exact-match + current-week fallback with a single
cutoff-anchored window: create_date in [cutoff_date - 6 days, cutoff_date].
Drafts created outside that window belong to a previous cycle and must
not be reused. The change applies to all four callers (load-draft,
clear-cart, save-order, confirm) so the merge/confirm paths also stop
attaching to stale drafts.

Covered by a new regression test that mirrors the production setup
(matching pickup_date, draft create_date backdated 10 days).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 17:40:48 +02:00
GitHub Copilot
6125515772 [IMP] stock_picking_batch_custom: order detailed ops by category, product, partner
Override _order on stock.move.line using the existing stored Many2one fields.
Odoo JOINs product.category and uses its _order (complete_name, which is stored)
so the full category path is used for sorting without any extra fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 20:22:18 +02:00
GitHub Copilot
f5670906f9 [IMP] stock_picking_batch_custom: order detailed ops by category, product, partner
Override _order on stock.move.line with stored Char fields so the server
returns records in the correct order on initial load (default_order in the
view only applies to interactive client-side sorting, not the initial fetch).

Add product_name and partner_name stored related fields to avoid SQL JOINs
in ORDER BY. Use the same fields in the view's default_order for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 20:12:39 +02:00
GitHub Copilot
8b9995526e [IMP] stock_picking_batch_custom: order detailed ops by category, product, partner
Store picking_partner_id on stock.move.line and set default_order to
product_categ_complete_name, product_id, picking_partner_id in the
detailed operations view so sorting uses the full category path
(e.g. 'SECO ENVASADO / Aperitivos') instead of only the leaf name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 20:01:17 +02:00
GitHub Copilot
16941b8183 [IMP] stock_picking_batch_custom: increase quantity column size for touch usability
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 19:32:20 +02:00
GitHub Copilot
72da09715d [IMP] stock_picking_batch_custom: widen quantity column for easier touch interaction
Add o_batch_move_line_list class to the detailed ops list and use it to
set min-width: 100px on the quantity column header and cells.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 19:31:34 +02:00