addons-cm/README.md
GitHub Copilot ef1283be7c [REF] stock_picking_batch_collect: rename and drop the aplicoop dependency
"custom" said nothing about what the module does. It is really about collecting
goods into baskets: the extra detailed-operation columns, the is_collected flag,
the Product Summary tab, the per-company validation restrictions and the
Basket Assembly operator view all serve that one job. Rename it accordingly.

Invert the dependency while at it. A generic warehouse addon was dragging in an
entire eCommerce application, and the whole coupling was a single field:
stock.move.line.home_delivery, related to picking_id.home_delivery. Everything
else was already duck-typed. website_sale_aplicoop now depends on this module
and injects its own consumer group columns into these views.

This removes duplicated logic rather than relocating it: stock.picking
.batch_consumer_group_id re-derived from sale_id a value aplicoop already stored
as stock.picking.consumer_group_id, and the duplicate carried no @api.depends,
so it never recomputed reliably. The batch transfers list now shows the stored
field, which is sortable and groupable.

The two aplicoop tests that probed information_schema for the res_company
batch_* columns can drop that guard: a real dependency guarantees them.

Renaming an addon is not something a migrations/ script can do, since a renamed
addon is a brand new module to Odoo and its migration scripts never run. A
pre_init_hook does it instead: it fires on install after the Python is imported
but before registry.load(), which is the window where remapping ir_model_data
makes Odoo reuse the existing tables and columns. is_collected, the summary line
table and the company settings all survive untouched.

Two details the hook has to get right:

- ir_model_constraint.module and ir_model_relation.module are integer FKs with
  ON DELETE CASCADE, so they must be repointed before the old module row is
  deleted or the bookkeeping goes with it.
- Deleting an ir_model_data row does not cascade to the record it points at.
  Artifacts handed over to aplicoop only need the xmlid dropped, but artifacts
  that disappear need the record deleted too, or the field survives as an orphan
  manual field and the view as a custom view referencing it.

Verified against a restored copy of the dev database: 50 xmlids moved, 19 summary
lines and 5 collected move lines preserved, no orphans, both test suites green,
and the module installs cleanly on a database without website_sale_aplicoop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 14:26:47 +02:00

4 KiB

Odoo Addons — Criptomart

Colección de addons Odoo 18.0 para Criptomart / Elika Bilbo. Incluye addons OCA incluidos como dependencias y addons custom desarrollados internamente.

Addons OCA (dependencias incluidas)

Addons del ecosistema OCA incorporados al repositorio. No se modifican salvo hotfixes puntuales.

Addon Versión Descripción
account_invoice_triple_discount 18.0.1.0.0 Triple descuento en líneas de factura
product_get_price_helper 18.0.1.1.0 Helper para obtener precios de producto respetando tarifas
product_main_seller 18.0.1.0.0 Campo "proveedor principal" en producto
product_origin_char 18.0.2.0.0 Campo de texto libre para origen del producto
product_price_category 18.0.1.0.0 Categoría de precio en producto + aplicación masiva vía tarifas
purchase_triple_discount 18.0.1.0.0 Triple descuento en líneas de pedido de compra

Addons Custom

Addons desarrollados por Criptomart para necesidades específicas del proyecto.

Addon Versión Descripción
account_invoice_triple_discount_readonly 18.0.1.0.0 Corrige bug de acumulación de descuentos y pone descuento total en solo lectura
membership_expiry_reminder 18.0.1.0.0 Recordatorio por email de membresías próximas a vencer
portal_event_registration 18.0.1.0.0 Vista portal de inscripciones a eventos con adjuntos al chatter
product_price_category_supplier 18.0.1.0.0 Categoría de precio por defecto en proveedor + actualización masiva de productos
product_pricelist_total_margin 18.0.1.2.0 Margen aditivo (no compuesto) en tarifas encadenadas, con límites globales
product_sale_price_from_pricelist 18.0.2.7.0 Calcula precio de venta desde último precio de compra vía tarifa configurable
stock_picking_batch_collect 18.0.2.0.0 Montaje de cestas en lotes: columnas extra, resumen por producto y vista operario
web_list_striped 18.0.1.0.0 Efecto cebra y hover suave en todas las listas del backend (sólo CSS)
website_sale_aplicoop 18.0.1.17.0 Sistema de pedidos colaborativos para grupos de consumo (reemplazo de Aplicoop)

Dependencias entre addons custom

website_sale_aplicoop
  └── product_sale_price_from_pricelist
        └── product_pricelist_total_margin
              └── product_price_category
  └── product_main_seller
  └── product_price_category_supplier
        └── product_price_category
  └── stock_picking_batch_collect
        └── stock_move_manual_quantity

stock_picking_batch_collect
  └── stock_move_manual_quantity
  └── stock_picking_batch (Odoo core)

account_invoice_triple_discount_readonly
  └── account_invoice_triple_discount
  └── purchase_triple_discount

Desarrollo

Instalación / actualización de un addon

docker-compose exec -T odoo odoo -d odoo -u <nombre_addon> --stop-after-init

Tests

docker-compose exec -T odoo odoo -d odoo --test-enable --stop-after-init -u <nombre_addon>

Linters

# Python
black . && isort . && flake8 . && pylint --load-plugins=pylint_odoo <addon>/

# JS
npx eslint <addon>/static/src/

Ver docs/LINTERS_README.md para configuración completa.

Traducciones

Ver docs/TRANSLATIONS.md.

Documentación técnica

Ver carpeta docs/ para documentación transversal (instalación, lazy loading, QWeb, etc.).