[ADD] website_sale_aplicoop: Product blacklist feature for group orders

- Add excluded_product_ids field for explicit product exclusion
- Blacklist has absolute priority over all inclusion sources (product_ids, category_ids, supplier_ids)
- Update _get_products_for_group_order() with blacklist filter logic
- Rename 'Associations' section to 'Catálogo de Productos' with subsections:
  * Productos Incluidos (whitelist: suppliers, categories, direct products)
  * Productos Excluidos (blacklist: explicit exclusions)
- Add comprehensive test suite (TestProductBlacklist class with 7 tests)
- Add Spanish and Euskera translations
- Update available_products_count computation to include excluded_product_ids
- Version bump to 18.0.1.4.0

Use case: Bulk inclusion via categories/suppliers + fine-grained exclusion via blacklist
Example: Select a category with 100 products, exclude 5 unwanted → 95 available
This commit is contained in:
snt 2026-02-22 20:41:11 +01:00
parent 4a4639f13a
commit 75ebb7b907
7 changed files with 4765 additions and 7222 deletions

View file

@ -1,5 +1,39 @@
# Changelog - Website Sale Aplicoop
## [18.0.1.4.0] - 2026-02-22
### Added
- **Product Blacklist Feature**: New exclusion system for group orders
- New field: `excluded_product_ids` (Many2many to product.product)
- Blacklist has absolute priority over all inclusion sources (product_ids, category_ids, supplier_ids)
- Model method: Updated `_get_products_for_group_order()` with blacklist filter
- Comprehensive test suite in `test_product_discovery.py` (TestProductBlacklist class)
### Changed
- **UI Improvements**: Renamed "Associations" section to "Catálogo de Productos" for better user clarity
- New subsection: "Productos Incluidos" (whitelist: suppliers, categories, direct products)
- New subsection: "Productos Excluidos" (blacklist: explicit exclusions)
- Updated help texts for all inclusion fields
- Complete Spanish and Euskera translations
- **Product Discovery Logic**:
- `_get_products_for_group_order()` now applies `excluded_product_ids` filter at the end
- Products in blacklist never appear, regardless of inclusion source
- `_compute_available_products_count()` now depends on `excluded_product_ids`
- Detailed logging for excluded product count
### Technical Details
- New M2M relation: `group_order_excluded_product_rel` (separate from whitelist relations)
- Blacklist filter uses set subtraction: `products = products - order.excluded_product_ids`
- All tests validate absolute priority: direct products, category products, supplier products, and multi-source products all respect blacklist
### Use Case
- Admin selects a category with 100 products → adds to category_ids
- Admin identifies 5 unwanted products → adds to excluded_product_ids
- Result: 95 products available in the order
- Workflow: Bulk inclusion via categories/suppliers + fine-grained exclusion via blacklist
## [18.0.1.3.0] - 2026-02-16
### Added