Odoo addons personalizados por Criptomart
Members can now pay their eskaera at checkout, through the standard Odoo payment machinery. Enabled per group order with a new `online_payment` boolean, off by default: an order without it behaves exactly as before, members save a draft and the cutoff cron confirms them in bulk. The flow mirrors website_sale's: the checkout button becomes "Confirm and pay", saving the cart redirects to a new /eskaera/<slug>/payment step that renders `payment.form` from `sale`'s `_get_payment_values`, and the standard /my/orders/<id>/transaction route takes it from there. This addon ships no provider and configures none; the co-op publishes whichever it wants. `website_sale`'s `_get_shop_payment_values` is deliberately not reused: it runs `_get_shop_payment_errors`, which blocks on shippable products without a delivery method — exactly an eskaera order, collected at the co-op with no carrier. For the same reason the transaction route stays the portal one, which does not call `_check_cart_is_ready_to_be_paid()`. Payment confirms the order, which has three consequences handled here: * `payment.transaction._check_amount_and_confirm_order` now confirms group orders with `from_orderpoint=True`, the way the cutoff cron already does. Without it a product with a broken replenishment route raises inside `_post_process`, and `/payment/status/poll` rolls back and re-raises: the member sees a payment error over a `done` transaction and the retry cron fails forever. * `_confirm_linked_sale_orders` also sweeps the cycle's already confirmed orders into the picking batch, scoped by `pickup_date`. Its early return on "no drafts" ran before any batching, so a fully prepaid cycle produced no batch at all. `_cron_batch_paid_orders_of_closed_cycles` covers the same hole for cycles closed by hand. * A duplicate-order guard answers 409 on save-order, add-to-cart and load-draft, and shows a notice on the shop, so a member whose order is already placed cannot build and pay for a second one. The payment policy lives in the model rather than the controller: there are three sale.order creation paths and two are live, so `_compute_require_payment` and `_compute_prepayment_percent` are extended instead of patching five vals dicts. Orders are also created under the group order's company, which is what filters the payment providers. Along the way: eskaera drafts were invisible in /my/orders. The portal rule is `message_partner_ids child_of` and sale.order only subscribes the customer on send or confirm, never on a draft create, so the `_prepare_orders_domain` override that includes drafts never had any effect. Fixed with an explicit `message_subscribe`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .github | ||
| .vscode | ||
| account_banking_mandate_batch | ||
| account_invoice_triple_discount_readonly | ||
| docs | ||
| l10n_es_edi_tbai_reagyp_recibidas | ||
| l10n_es_partner_ccpae | ||
| membership_expiry_reminder | ||
| membership_monthly_invoicing | ||
| membership_payment_date | ||
| portal_event_registration | ||
| pos_account_payment_order_sepa | ||
| pos_full_refund | ||
| pos_order_reorder | ||
| pos_payment_method_cashdro_fix | ||
| pos_payment_method_cashdro_rounding | ||
| product_origin_char | ||
| product_price_category_supplier | ||
| product_pricelist_total_margin | ||
| product_sale_price_from_pricelist | ||
| purchase_rappel | ||
| scripts | ||
| setup | ||
| sort_lines_by_product_name | ||
| stock_picking_batch_custom | ||
| stock_picking_report_undelivered_product | ||
| website_membership_associate | ||
| website_membership_signup_required | ||
| website_sale_aplicoop | ||
| website_sale_disable_cart | ||
| .editorconfig | ||
| .flake8 | ||
| .gitignore | ||
| .isort.cfg | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .prettierrc.yml | ||
| .pylintrc | ||
| .pylintrc-mandatory | ||
| check_addon.sh | ||
| check_tax_config.sh | ||
| docker-compose.yml | ||
| eslint.config.js | ||
| Makefile | ||
| oca_dependencies.txt | ||
| odoo.conf | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
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_custom | 18.0.1.0.0 | Columnas extra en operaciones detalladas de lotes: partner, categoría, recogido |
| website_sale_aplicoop | 18.0.1.9.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
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.).