## [18.0.1.0.3] - 2025-12-19

### Added
- Centralised product discovery API on `group.order`: `_get_products_for_group_order(order_id)`.
- Backward-compatible delegation on `product.product._get_products_for_group_order`.
- Controller `AplicoopWebsiteSale` now delegates discovery to `group.order` and sanitises supplier display.

### Changed
- Moved discovery responsibility from `product.product` to `group.order` (single responsibility).
- Updated `eskaera_shop`, `add_to_eskaera_cart` and `confirm_eskaera` to use centralised discovery.

### Fixed
- Avoided runtime AttributeError when discovery function was not present by providing a canonical implementation.
- Ensured product discovery priority remains: explicit products → categories → suppliers.
 - Fixed a regression where discovery returned only one association branch; discovery now
	 returns the UNION of products from `product_ids`, `category_ids` and
	 `supplier_ids` to avoid dropping valid products when multiple associations exist.

	Note: this change documents and prevents a repeated mistake where a single
	fallback branch hid products from other association fields.

### Tests
- `website_sale_aplicoop` test-suite: 63 tests, 0 failures after the refactor (commit 4b15207).

### Security
- Kept portal surface minimal (no `res.partner` records exposed); controller only injects supplier name/city for display.

### I18N
- Regenerated translation template (`.pot`) using an addon-only export to avoid collecting unrelated Odoo strings.
- Added `docs/I18N_EXPORT_PITFALL.md` explaining the common export pitfall and safe export workflow (export to `/tmp`, restrict `--addons-path`, use `msgmerge`).
- Added `tools/filter_pot_by_module.py` to filter POT files by module references and applied it to reduce the POT to addon-only entries (~168 entries).
- Updated and committed cleaned `.po` files for all supported languages (es, pt, gl, ca, eu, fr, it).

## [18.0.1.0.2] - 2025-12-14

### Added
- Multi-company support with company_id field on group.order
- Company validation constraint to ensure groups belong to the same company
- Multi-company filtering in get_active_orders_for_week() method
- company_id field on res.partner for user-group relationships
- 9 new test cases for multi-company scenarios (test_multi_company.py)
- Post-migration script to assign default company to existing group.order records

### Changed
- group.order now respects allowed_company_ids context for data isolation
- get_active_orders_for_week() filters by company context when applicable
- group_ids domain now validates company relationships

### Fixed
- Ensured multi-company data isolation between different organizations

## [18.0.1.0.1] - 2025-12-14

### Added
- Product discovery with 3-level fallback system (direct → categories → suppliers)
- Search functionality by product name and description in eskaera_shop
- Dynamic category filtering dropdown on shopping page
- Product thumbnail images with fallback icons in base64 encoding
- Comprehensive logging for debugging group order flow
- Logging of cutoff day, pickup day, and order dates in eskaera_shop
- 7 new test cases for product discovery scenarios (test_eskaera_shop.py)
- Criptomart branding with logo.svg
- Professional HTML documentation in static/description/index.html

### Changed
- Refactored product lookup to support three discovery methods
- Updated confirm_eskaera to accept products from any discovery method
- Improved error handling in checkout flow
- Enhanced template rendering with conditional field validation
- Optimized product search with regex and case-insensitive matching

### Fixed
- Fixed products not appearing when assigned via categories or suppliers (discovered via fallback)
- Fixed translation errors in 7 languages (es, fr, ca, eu, gl, it, pt) - order type labels
- Removed obsolete website_sale.py model file causing ImportError
- Fixed checkout validation that blocked orders with category/supplier-discovered products
- Fixed QWebException when start_date is optional by adding t-if validation
- Fixed duplicate sale.order creation from double event binding on confirm button
- Corrected product supplier relationship in tests (use seller_ids instead of supplier_id)

### Deprecated
- N/A

### Removed
- Obsolete models/website_sale.py file (functionality migrated to controllers)
- Duplicate event listener on confirm button in website_templates.xml
- Fallback confirmCheckout() function from template (handled by JS)

### Security
- Maintained CSRF protection on all POST routes
- Input validation on JSON payloads in confirm_eskaera
- Access control validation for group membership

## [18.0.1.0.0-beta] - 2025-12-13

### Added
- Initial beta release of Website Sale - Aplicoop module
- Complete group order management system (draft → open → closed/cancelled)
- Flexible scheduling with start/end dates and optional time windows
- Cutoff day support for weekly order management
- Product and supplier associations
- Group-based user relationships
- Full i18n support for 7 languages (ES, FR, CA, EU, GL, IT, PT)
- 26 passing tests covering model logic and business rules
- OCA-compliant documentation structure
- AGPL-3.0 licensing

### Changed
- N/A (initial release)

### Fixed
- N/A (initial release)

### Deprecated
- N/A (initial release)

### Removed
- N/A (initial release)

### Security
- Access control via group permissions
- CSRF protection on all POST routes
- Input validation on client and server side
