Skip to content

[19.0][ADD] website_sale_category_show_empty - #1286

Open
MarcGForgeFlow wants to merge 1 commit into
OCA:19.0from
MarcGForgeFlow:19.0-add-website_sale_category_show_empty
Open

[19.0][ADD] website_sale_category_show_empty#1286
MarcGForgeFlow wants to merge 1 commit into
OCA:19.0from
MarcGForgeFlow:19.0-add-website_sale_category_show_empty

Conversation

@MarcGForgeFlow

Copy link
Copy Markdown

Odoo hides eCommerce category pages that hold no published product from public and portal visitors, through the record rule website_sale.empty_public_categories_rule, and the shop route turns the resulting access error into a 404. That is the right default for a catalogue that mirrors stock, but not for pages carrying editorial content of their own, such as a manufacturer or brand page a shop wants to keep reachable while nothing of that brand is published.

This module adds a Show When Empty flag on the category. Flagged categories stay readable for public and portal visitors whatever their product count.

Record rules bound to groups are OR-ed together, so the module ships a second rule on the same groups rather than editing the core one. The core record is left untouched and the module uninstalls cleanly.

The flag governs access to the page only. Shop sidebars and mega menus filter on has_published_products directly rather than through the record rule, so a flagged empty category is reachable by its URL but stays out of those navigation blocks. This is documented in the usage notes.

…ublished product

website_sale hides eCommerce categories holding no published product from
public and portal visitors, and the shop route turns the resulting access error
into a 404. Add a per-category flag for pages that should stay reachable
regardless, such as a manufacturer page kept for its own content.

Group record rules are OR-ed together, so this ships a second rule on the same
groups instead of editing the core one, which leaves it untouched on uninstall.
@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_category_show_empty Module website_sale_category_show_empty labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_sale_category_show_empty Module website_sale_category_show_empty series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants