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 | pilarvargas-tecnativa | Displays the user's regular products in the e-commerce. [website_sale_order_type](website_sale_order_type/) | 17.0.1.0.0 | pilarvargas-tecnativa | 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 | Tardo | 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 @@ -Website Sale - Hide Empty Categories +README.rst -
-

Website Sale - Hide Empty Categories

+
+ + +Odoo Community Association + +
+

Website Sale - Hide Empty Categories

-

Beta License: LGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runboat

Removes any category links from the Shop which have no products associated to them.

Table of contents

@@ -387,7 +392,7 @@

Website Sale - Hide Empty Categories

-

Configuration

+

Configuration

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 @@

Configuration

-

Usage

+

Usage

Once this module is installed and configured, go to ‘/shop’. Empty categories will not be show.

-

Bug Tracker

+

Bug Tracker

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 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • LasLabs
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -448,5 +453,6 @@

Maintainers

+
diff --git a/website_sale_wishlist_hide_price/README.rst b/website_sale_wishlist_hide_price/README.rst new file mode 100644 index 0000000000..2d96a01dab --- /dev/null +++ b/website_sale_wishlist_hide_price/README.rst @@ -0,0 +1,83 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================================ +Website Sale Wishlist Hide Price +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f4d95262fea9922e14a29eed28bd5671faceded4a4f7bfc5040cd34f938c6bac + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github + :target: https://github.com/OCA/e-commerce/tree/17.0/website_sale_wishlist_hide_price + :alt: OCA/e-commerce +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_wishlist_hide_price + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the base of website_sale_hide_price to hide prices +in the wishlist views as well. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__: + + - Pilar Vargas + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/e-commerce `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_wishlist_hide_price/__init__.py b/website_sale_wishlist_hide_price/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/website_sale_wishlist_hide_price/__manifest__.py b/website_sale_wishlist_hide_price/__manifest__.py new file mode 100644 index 0000000000..a1ac146881 --- /dev/null +++ b/website_sale_wishlist_hide_price/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2024 Tecnativa - Pilar Vargas +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Website Sale Wishlist Hide Price", + "version": "17.0.1.0.0", + "category": "Website", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/e-commerce", + "license": "AGPL-3", + "summary": "Hide product prices on the shop", + "depends": ["website_sale_hide_price", "website_sale_wishlist"], + "data": ["views/website_sale_template.xml"], + "installable": True, + "auto_install": True, + "assets": { + "web.assets_tests": [ + "/website_sale_wishlist_hide_price/static/tests/tours/*.js", + ] + }, +} diff --git a/website_sale_wishlist_hide_price/i18n/it.po b/website_sale_wishlist_hide_price/i18n/it.po new file mode 100644 index 0000000000..73388557f6 --- /dev/null +++ b/website_sale_wishlist_hide_price/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" diff --git a/website_sale_wishlist_hide_price/i18n/website_sale_wishlist_hide_price.pot b/website_sale_wishlist_hide_price/i18n/website_sale_wishlist_hide_price.pot new file mode 100644 index 0000000000..716a0702d8 --- /dev/null +++ b/website_sale_wishlist_hide_price/i18n/website_sale_wishlist_hide_price.pot @@ -0,0 +1,13 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" diff --git a/website_sale_wishlist_hide_price/pyproject.toml b/website_sale_wishlist_hide_price/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/website_sale_wishlist_hide_price/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/website_sale_wishlist_hide_price/readme/CONTRIBUTORS.md b/website_sale_wishlist_hide_price/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..5012e890b9 --- /dev/null +++ b/website_sale_wishlist_hide_price/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [Tecnativa](https://www.tecnativa.com/): + - Pilar Vargas diff --git a/website_sale_wishlist_hide_price/readme/DESCRIPTION.md b/website_sale_wishlist_hide_price/readme/DESCRIPTION.md new file mode 100644 index 0000000000..0c5dd86425 --- /dev/null +++ b/website_sale_wishlist_hide_price/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module extends the base of website_sale_hide_price to hide prices +in the wishlist views as well. diff --git a/website_sale_wishlist_hide_price/static/description/icon.png b/website_sale_wishlist_hide_price/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/website_sale_wishlist_hide_price/static/description/icon.png differ diff --git a/website_sale_wishlist_hide_price/static/description/index.html b/website_sale_wishlist_hide_price/static/description/index.html new file mode 100644 index 0000000000..cca7ea6399 --- /dev/null +++ b/website_sale_wishlist_hide_price/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Website Sale Wishlist Hide Price

+ +

Beta License: AGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runboat

+

This module extends the base of website_sale_hide_price to hide prices +in the wishlist views as well.

+

Table of contents

+ +
+

Bug Tracker

+

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 +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/e-commerce project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/website_sale_wishlist_hide_price/static/tests/tours/website_sale_wishlist_hide_price_tour.esm.js b/website_sale_wishlist_hide_price/static/tests/tours/website_sale_wishlist_hide_price_tour.esm.js new file mode 100644 index 0000000000..cd3f8e4e1c --- /dev/null +++ b/website_sale_wishlist_hide_price/static/tests/tours/website_sale_wishlist_hide_price_tour.esm.js @@ -0,0 +1,26 @@ +/** @odoo-module **/ + +import {registry} from "@web/core/registry"; + +registry.category("web_tour.tours").add("website_sale_wishlist_hide_price_tour", { + test: true, + checkDelay: 250, + url: "/shop?search=Customizable Desk", + steps: () => [ + { + content: "click on add to wishlist", + trigger: ".o_add_wishlist", + }, + { + content: "go to wishlist", + extra_trigger: 'a[href="/shop/wishlist"] .badge:contains(1)', + trigger: 'a[href="/shop/wishlist"]', + }, + { + content: + "verify that the product 'Customizable Desk' is in the wishlist without the 'Add to Wishlist' button or price displayed", + trigger: + "tr:has(a:contains('Customizable Desk')):not(:has(button.o_wish_add)):not(:has(span.oe_currency_value)):visible", + }, + ], +}); diff --git a/website_sale_wishlist_hide_price/tests/__init__.py b/website_sale_wishlist_hide_price/tests/__init__.py new file mode 100644 index 0000000000..f49429ef69 --- /dev/null +++ b/website_sale_wishlist_hide_price/tests/__init__.py @@ -0,0 +1 @@ +from . import test_tour diff --git a/website_sale_wishlist_hide_price/tests/test_tour.py b/website_sale_wishlist_hide_price/tests/test_tour.py new file mode 100644 index 0000000000..10163eb0b7 --- /dev/null +++ b/website_sale_wishlist_hide_price/tests/test_tour.py @@ -0,0 +1,15 @@ +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) +# Copyright 2024 Tecnativa - Pilar Vargas + +from odoo.tests import HttpCase, tagged + + +@tagged("post_install", "-at_install") +class TestWebsiteSaleProductAttachmentTourl(HttpCase): + def setUp(self): + super().setUp() + product = self.env.ref("product.product_product_4_product_template") + product.website_hide_price = True + + def test_tour(self): + self.start_tour("/shop", "website_sale_wishlist_hide_price_tour", login="demo") diff --git a/website_sale_wishlist_hide_price/views/website_sale_template.xml b/website_sale_wishlist_hide_price/views/website_sale_template.xml new file mode 100644 index 0000000000..900801e801 --- /dev/null +++ b/website_sale_wishlist_hide_price/views/website_sale_template.xml @@ -0,0 +1,18 @@ + + + +