Eskaera carried its own pricing path: a `website_sale_aplicoop.pricelist_id` setting resolved inside the Eskaera controllers, plus a local reimplementation of the tax and discount maths. The pricelist part meant /shop and Eskaera could quote different prices on the same website, and the maths part had drifted from the original it was copied from. Pricing is now the standard one. The setting is gone (a migration drops the parameter, which would otherwise linger looking like live configuration) and `_resolve_pricelist` is `request.website.pricelist_id`. Scoping a pricelist to a website is already core's job through `product.pricelist.website_id`, so running the plain shop on one website and the co-op on another needs no code here. Taxes are applied by `product.template._apply_taxes_to_price`, which fixes a real defect: it calls `_get_tax_included_unit_price_from_price` first, and this module did not. With a fiscal position remapping a tax-included tax, a product at 121 (100 + 21%) was displayed at 121 instead of 110, because the price was handed to the mapped tax as if it were already that tax's gross amount. The helper is a no-op without a remapping, so ordinary pricing is untouched. It also means the website's `show_line_subtotals_tax_selection` is respected rather than overridden with a hardcoded tax-included display. Listing a page now costs one `_compute_price_rule` call instead of one per product, which matters on the lazy-loading path. Two smaller things found on the way. `_get_product_price_rule` was being passed `target_currency=`, which is not one of its arguments: it fell into **kwargs and was ignored, so the conversion never happened. And `_compute_price_info` resolved `product.product_variant_ids[0]`, but it receives variants, so a multi-variant template was priced from its first variant rather than the one asked for. The delivery display price loses its hardcoded 5.74 fallback and reuses the same helpers as everything else. Kept local, because none of it is pricing: the /Kg and /L suffixes, the 0.1 quantity step for bulk goods, the base unit price and the supplier name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
89 lines
3.2 KiB
Python
89 lines
3.2 KiB
Python
# Copyright 2025 - Today Criptomart
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
|
|
|
{ # noqa: B018
|
|
"name": "Website Sale - Aplicoop",
|
|
"version": "18.0.1.15.0",
|
|
"category": "Website/Sale",
|
|
"summary": "Modern replacement of legacy Aplicoop - Collaborative consumption group orders",
|
|
"author": "Odoo Community Association (OCA), Criptomart",
|
|
"maintainers": ["Criptomart"],
|
|
"website": "https://git.criptomart.net/criptomart/addons-cm",
|
|
"license": "AGPL-3",
|
|
"depends": [
|
|
"website_sale",
|
|
"website_sale_stock",
|
|
"payment",
|
|
"product",
|
|
"sale",
|
|
"stock",
|
|
"stock_picking_batch",
|
|
"account",
|
|
"product_get_price_helper",
|
|
"l10n_es_partner",
|
|
],
|
|
"data": [
|
|
# Datos: Grupos propios
|
|
"data/groups.xml",
|
|
# Datos: Menús del website
|
|
"data/website_menus.xml",
|
|
# Datos: Cron jobs
|
|
"data/cron.xml",
|
|
# Datos: Product ribbons for stock levels
|
|
"data/product_ribbon_data.xml",
|
|
# Vistas de seguridad
|
|
"security/ir.model.access.csv",
|
|
"security/record_rules.xml",
|
|
# Vistas
|
|
"views/group_order_views.xml",
|
|
"views/product_category_views.xml",
|
|
"views/res_partner_views.xml",
|
|
"views/res_config_settings_views.xml",
|
|
"views/website_templates.xml",
|
|
"views/product_template_views.xml",
|
|
"views/sale_order_views.xml",
|
|
"views/stock_picking_views.xml",
|
|
"views/portal_templates.xml",
|
|
"views/load_from_history_templates.xml",
|
|
],
|
|
"demo": [
|
|
# Demo: Account Taxes (must be loaded first)
|
|
"demo/account_tax_demo.xml",
|
|
# Demo: Partners (Groups and Members)
|
|
"demo/res_partner_demo.xml",
|
|
# Demo: Suppliers
|
|
"demo/res_partner_suppliers_demo.xml",
|
|
# Demo: Products and Categories
|
|
"demo/product_demo.xml",
|
|
# Demo: Group Orders
|
|
"demo/group_order_demo.xml",
|
|
# Demo: Sale Orders
|
|
"demo/sale_order_demo.xml",
|
|
],
|
|
"external_dependencies": {
|
|
"python": [],
|
|
},
|
|
"assets": {
|
|
"web.assets_frontend": [
|
|
"website_sale_aplicoop/static/src/css/website_sale.css",
|
|
# i18n and helpers must load first
|
|
"website_sale_aplicoop/static/src/js/i18n_manager.js",
|
|
"website_sale_aplicoop/static/src/js/i18n_helpers.js",
|
|
# Core shop functionality
|
|
"website_sale_aplicoop/static/src/js/website_sale.js",
|
|
"website_sale_aplicoop/static/src/js/checkout_labels.js",
|
|
"website_sale_aplicoop/static/src/js/home_delivery.js",
|
|
"website_sale_aplicoop/static/src/js/eskaera_payment.js",
|
|
# Search and pagination
|
|
"website_sale_aplicoop/static/src/js/infinite_scroll.js",
|
|
"website_sale_aplicoop/static/src/js/realtime_search.js",
|
|
],
|
|
"web.assets_tests": [
|
|
"website_sale_aplicoop/static/tests/test_suite.js",
|
|
"website_sale_aplicoop/static/tests/test_cart_functions.js",
|
|
"website_sale_aplicoop/static/tests/test_tooltips_labels.js",
|
|
"website_sale_aplicoop/static/tests/test_realtime_search.js",
|
|
],
|
|
},
|
|
"application": True,
|
|
}
|