addons-cm/website_sale_aplicoop/models/res_config_settings.py
GitHub Copilot b3999e2283 [REM] website_sale_aplicoop: remove dead code and orphaned tests
Duplicate _translate_labels fallback, unreachable /eskaera/add-to-cart and
/eskaera/save-cart routes (the frontend cart is localStorage-only and uses
save-order), redundant pickup wrappers, unused pagination/count helpers and
fields, deprecated JS shims, and the already-empty checkout_summary.js and
i18n key/init leftovers.

Also drops 11 tests/*.py never wired into tests/__init__.py: three were
unimplemented placeholders (setUp with no assertions), and the other eight
had real assertions but were bit-rotted against the current schema (e.g.
res.partner.is_supplier no longer exists) — wiring them in surfaced 43
failures unrelated to this cleanup. Verified 0 failed/0 errors of 270 tests
both before and after.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-16 22:31:13 +02:00

36 lines
1.3 KiB
Python

from odoo import fields
from odoo import models
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
aplicoop_pricelist_id = fields.Many2one(
"product.pricelist",
config_parameter="website_sale_aplicoop.pricelist_id",
help="Pricelist to use for Aplicoop group orders. If not set, will use website default.",
)
eskaera_lazy_loading_enabled = fields.Boolean(
string="Enable Lazy Loading",
config_parameter="website_sale_aplicoop.lazy_loading_enabled",
default=True,
help="Enable lazy loading of products in group order shop. Products will be paginated.",
)
eskaera_products_per_page = fields.Integer(
string="Products Per Page",
config_parameter="website_sale_aplicoop.products_per_page",
default=20,
help="Number of products to load per page in group order shop. Minimum 5, Maximum 100.",
)
low_stock_threshold = fields.Float(
string="Low Stock Threshold",
config_parameter="website_sale_aplicoop.low_stock_threshold",
default=5.0,
help="Products with stock below or equal to this value will show 'Low Stock' ribbon. "
"Products with stock = 0 will show 'Out of Stock' ribbon and cannot be added to cart.",
)