Maintainers
+Maintainers
This module is maintained by the OCA.
@@ -448,5 +453,6 @@ diff --git a/README.md b/README.md
index 06e291d9b6..a53ae1393c 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ addon | version | maintainers | summary
[website_sale_cart_add_product_xlsx_csv](website_sale_cart_add_product_xlsx_csv/) | 17.0.1.0.1 | | Adds button to import xlsx or csv in website cart
[website_sale_checkout_skip_payment](website_sale_checkout_skip_payment/) | 17.0.1.0.1 | | Skip payment for logged users in checkout process
[website_sale_empty_cart](website_sale_empty_cart/) | 17.0.1.0.0 | | Adds a button in the website cart to empty all
-[website_sale_hide_empty_category](website_sale_hide_empty_category/) | 17.0.1.0.0 | | Hide any Product Categories that are empty
+[website_sale_hide_empty_category](website_sale_hide_empty_category/) | 17.0.1.0.1 | | Hide any Product Categories that are empty
[website_sale_hide_price](website_sale_hide_price/) | 17.0.1.2.1 | | Hide product prices on the shop
[website_sale_menu_partner_top_selling](website_sale_menu_partner_top_selling/) | 17.0.1.0.0 |
| Displays the user's regular products in the e-commerce.
[website_sale_order_type](website_sale_order_type/) | 17.0.1.0.0 |
| This module allows sale_order_type to work with website_sale.
@@ -49,6 +49,7 @@ addon | version | maintainers | summary
[website_sale_stock_provisioning_date](website_sale_stock_provisioning_date/) | 17.0.1.0.0 | | Display provisioning date for a product in shop online
[website_sale_suggest_create_account](website_sale_suggest_create_account/) | 17.0.1.0.0 | | Suggest users to create an account when buying in the website
[website_sale_vat_required](website_sale_vat_required/) | 17.0.1.0.0 | | VAT number required in checkout form
+[website_sale_wishlist_hide_price](website_sale_wishlist_hide_price/) | 17.0.1.0.0 | | Hide product prices on the shop
[website_sale_wishlist_keep](website_sale_wishlist_keep/) | 17.0.1.0.0 | | Allows to add products to my cart but keep it in my wishlist"
[website_snippet_product_category](website_snippet_product_category/) | 17.0.1.0.0 |
| Adds a new snippet to show e-commerce categories
diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml
index a4c7679649..ae13382607 100644
--- a/setup/_metapackage/pyproject.toml
+++ b/setup/_metapackage/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "odoo-addons-oca-e-commerce"
-version = "17.0.20260326.0"
+version = "17.0.20260331.0"
dependencies = [
"odoo-addon-website_sale_b2x_alt_price>=17.0dev,<17.1dev",
"odoo-addon-website_sale_barcode_search>=17.0dev,<17.1dev",
@@ -30,6 +30,7 @@ dependencies = [
"odoo-addon-website_sale_stock_provisioning_date>=17.0dev,<17.1dev",
"odoo-addon-website_sale_suggest_create_account>=17.0dev,<17.1dev",
"odoo-addon-website_sale_vat_required>=17.0dev,<17.1dev",
+ "odoo-addon-website_sale_wishlist_hide_price>=17.0dev,<17.1dev",
"odoo-addon-website_sale_wishlist_keep>=17.0dev,<17.1dev",
"odoo-addon-website_snippet_product_category>=17.0dev,<17.1dev",
]
diff --git a/website_sale_hide_empty_category/README.rst b/website_sale_hide_empty_category/README.rst
index 466453d5d4..ad495f9134 100644
--- a/website_sale_hide_empty_category/README.rst
+++ b/website_sale_hide_empty_category/README.rst
@@ -1,3 +1,7 @@
+.. image:: https://odoo-community.org/readme-banner-image
+ :target: https://odoo-community.org/get-involved?utm_source=readme
+ :alt: Odoo Community Association
+
====================================
Website Sale - Hide Empty Categories
====================================
@@ -7,13 +11,13 @@ Website Sale - Hide Empty Categories
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:8f9521a802f33a49a1e02a3ddc99dc6273c95852a68f8cafe4dada8cc4431df0
+ !! source digest: sha256:c74afdee8feb094a415bb0ca0a6f09be384a397c16be4651b656dbe03289a748
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
-.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
+.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
diff --git a/website_sale_hide_empty_category/__manifest__.py b/website_sale_hide_empty_category/__manifest__.py
index 2808ee16f5..f4268c7e2d 100644
--- a/website_sale_hide_empty_category/__manifest__.py
+++ b/website_sale_hide_empty_category/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Website Sale - Hide Empty Categories",
"summary": "Hide any Product Categories that are empty",
- "version": "17.0.1.0.0",
+ "version": "17.0.1.0.1",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "LasLabs, Odoo Community Association (OCA)",
diff --git a/website_sale_hide_empty_category/models/product_public_category.py b/website_sale_hide_empty_category/models/product_public_category.py
index 279715b389..7a61a2a98c 100644
--- a/website_sale_hide_empty_category/models/product_public_category.py
+++ b/website_sale_hide_empty_category/models/product_public_category.py
@@ -14,9 +14,14 @@ class ProductPublicCategory(models.Model):
)
@api.depends("product_tmpl_ids", "child_id.has_product_recursive")
+ @api.depends_context("website_id")
def _compute_has_product_recursive(self):
for category in self:
- category.has_product_recursive = bool(
- category.product_tmpl_ids
- or any(child.has_product_recursive for child in category.child_id)
+ website = self.env["website"].get_current_website()
+ website_domain = website.website_domain()
+ has_products = bool(
+ category.product_tmpl_ids.filtered_domain(website_domain)
+ )
+ category.has_product_recursive = has_products or any(
+ child.has_product_recursive for child in category.child_id
)
diff --git a/website_sale_hide_empty_category/static/description/index.html b/website_sale_hide_empty_category/static/description/index.html
index 9b6ddf3073..85961b9bc7 100644
--- a/website_sale_hide_empty_category/static/description/index.html
+++ b/website_sale_hide_empty_category/static/description/index.html
@@ -3,7 +3,7 @@
Removes any category links from the Shop which have no products associated to them.
Table of contents
@@ -387,7 +392,7 @@When the module is installed, by default the options to hide empty categories are active.
These options can be configured in the web editor. To do this, go to @@ -402,12 +407,12 @@
Once this module is installed and configured, go to ‘/shop’. Empty categories will not be show.
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -415,15 +420,15 @@
Do not contact contributors directly about support or help with technical issues.