diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000..4535011c60 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-website_sale_hide_price@git+https://github.com/OCA/e-commerce.git@refs/pull/1122/head#subdirectory=website_sale_hide_price diff --git a/website_sale_wishlist_hide_price/README.rst b/website_sale_wishlist_hide_price/README.rst new file mode 100644 index 0000000000..4f82496421 --- /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:413c7955198ddb5661fcc9ebd24b3a7a8fcb1577a03786d32e6b33eb589c7777 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/19.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-19-0/e-commerce-19-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=19.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..b55df76bb2 --- /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": "19.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/website_sale_wishlist_hide_price_tour.esm.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..aadee09bfe --- /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 18.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..a22616ddae --- /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..c4a58abcff --- /dev/null +++ b/website_sale_wishlist_hide_price/static/tests/tours/website_sale_wishlist_hide_price_tour.esm.js @@ -0,0 +1,35 @@ +/** @odoo-module **/ + +import {registry} from "@web/core/registry"; + +registry.category("web_tour.tours").add("website_sale_wishlist_hide_price_tour", { + url: "/shop?search=Test Product", + steps: () => [ + { + content: `Select Test Product`, + trigger: `.oe_product_cart:first a:text(Test Product)`, + run: "click", + expectUnloadPage: true, + }, + { + content: "click on add to wishlist", + trigger: ".o_add_wishlist_dyn", + run: "click", + }, + { + trigger: 'a[href="/shop/wishlist"] .badge:contains(1)', + }, + { + content: "go to wishlist", + trigger: 'a[href="/shop/wishlist"]', + run: "click", + expectUnloadPage: true, + }, + { + content: + "verify that the product 'Test Product' is in the wishlist without the 'Add to Wishlist' button or price displayed", + trigger: + "div:has(a:contains('Test Product')):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..0701cf3d83 --- /dev/null +++ b/website_sale_wishlist_hide_price/tests/test_tour.py @@ -0,0 +1,29 @@ +# 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["product.product"].create( + {"name": "Test Product", "is_published": True} + ) + product.website_hide_price = True + self.env["res.users"].create( + { + "name": "Wishlist Hide Price User", + "login": "wishlist_hide_price_user", + "email": "wishlist_hide_price_user@example.com", + } + ) + + def test_tour(self): + self.start_tour( + "/shop", + "website_sale_wishlist_hide_price_tour", + login="wishlist_hide_price_user", + debug=True, + ) 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..3e9af4a0ac --- /dev/null +++ b/website_sale_wishlist_hide_price/views/website_sale_template.xml @@ -0,0 +1,21 @@ + + + +