Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0] [MIG] website_sale_hide_price: Migration to 18.0 #989

Open
wants to merge 50 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6aebfad
[10.0] website_sale_hide_price: New module
chienandalu Aug 8, 2017
7077b4d
[MIG] website_sale_hide_price: Migration to 11.0
AbrahamTrey Jun 13, 2018
776d441
Translated using Weblate (Persian)
fshahy Jul 21, 2018
2392f51
Translated using Weblate (German)
Aug 27, 2018
c297241
[FIX][11.0][website_sale_hide_price] Disable Add to cart option to pr…
JuanjoA Oct 11, 2018
f2846a2
[FIX] web_sale_hide_price: fix error with product comparison tool
maitaoriana Mar 7, 2019
7d4f6a6
Translated using Weblate (Italian)
paolovalier Dec 28, 2018
28693e5
[MIG] website_sale_hide_price: Migration to 12.0
bouvyd Oct 29, 2018
55c007d
[MIG] website_sale_hide_price: Migration to 12.0
maitaoriana Feb 19, 2020
359a5e2
[REF] website_sale_hide_price: known issues added to README
maitaoriana Feb 19, 2020
aa6fba3
Translated using Weblate (German)
AndreVolksdorf Aug 11, 2020
0858840
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
34c6729
[IMP] website_sale_hide_price: black, isort, prettier
maitaoriana Oct 20, 2020
2940484
[MIG] website_sale_hide_price: Migration to 13.0
maitaoriana Oct 20, 2020
2c014df
[FIX] website_sale_hide_price: validate website exist in search box view
maitaoriana Oct 28, 2020
3651ddb
[FIX] website_sale_hide_price: wrong template inheritance
wtaferner Dec 5, 2020
e12002c
Translated using Weblate (Catalan)
claudiagn Feb 25, 2021
41c5689
Translated using Weblate (Spanish)
claudiagn Feb 25, 2021
1d1e6e3
[MIG] website_sale_hide_price: Migration to 14.0
May 18, 2021
60950c5
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 11, 2021
9afd21d
[IMP] website_sale_hide_price: hide price at product level
chienandalu May 13, 2022
0ff44ed
[IMP] website_sale_comparison_hide_price: hide price at product level
chienandalu May 13, 2022
22c8a5f
[MIG] website_sale_hide_price: Migration to 15.0
CarlosRoca13 Jun 2, 2022
bac8037
[MIG] website_sale_hide_price: Migration to 16.0
JrAdhoc Dec 16, 2022
46ed573
Translated using Weblate (Italian)
mymage Dec 28, 2022
b520be2
Translated using Weblate (Italian)
francesco-ooops Feb 1, 2023
eae609f
Translated using Weblate (Spanish (Argentina))
ibuioli Mar 12, 2023
b7bceb7
Added translation using Weblate (Portuguese)
pedrocs-exo Mar 29, 2023
1c28a01
Translated using Weblate (Portuguese)
pedrocs-exo Mar 29, 2023
2d9302b
fix error show badge_extra_price
manuelcalerosolis May 31, 2023
0fb42f3
[FIX] website_sale_hide_price: fix key error when editing snippet
pilarvargas-tecnativa May 26, 2023
9ea2aff
[IMP] website_sale_hide_price: Hide add to cart button and prices
pilarvargas-tecnativa May 29, 2023
079bab5
[FIX] website_sale_hide_price: hide the price in the add_to_cart option
pilarvargas-tecnativa Mar 1, 2023
ab320e3
[15.0][FIX] website_sale_hide_price, hide price on results of search bar
ChrisOForgeFlow Mar 14, 2023
ccd1c67
Translated using Weblate (German)
NICO-SOLUTIONS Jul 8, 2023
d087146
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
b53c7c2
[FIX] website_sale_hide_price: display price in search bar
remi-filament Jul 11, 2023
4e07cce
Translated using Weblate (Japanese)
rinaldifirdaus Sep 15, 2023
15a5c7a
[16.0][FIX] website_sale_hide_price: Error loading view after update
Nov 8, 2023
c0f29cf
[IMP] website_sale_hide_price: hide prices at website level
amkarthik Dec 27, 2023
f4a30ad
Translated using Weblate (Spanish)
Ivorra78 Jan 9, 2024
2b0effd
Translated using Weblate (Spanish (Argentina))
ibuioli Jan 17, 2024
647c3bf
[MIG] website_sale_hide_price: Migration to 17.0
sylvainvh Mar 27, 2024
f13f588
Translated using Weblate (Italian)
mymage Apr 16, 2024
3c99972
Translated using Weblate (Italian)
scigghia Apr 16, 2024
2b6f1d7
[17.0][FIX] website_sale_hide_price: qweb cache
stanislaw-ladorucki May 5, 2024
0ee26e1
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
92ab358
[FIX]website_sale_hide_price: improve button visibility logic
LuisAlejandroS Nov 20, 2024
f347e65
[IMP] website_sale_hide_price: pre-commit auto fixes
Borruso Nov 29, 2024
bc4a9cf
[MIG] website_sale_hide_price: Migration to 18.0
Borruso Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions website_sale_hide_price/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
=======================
Website Sale Hide Price
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a527724d118ccfc6608fc1b3fd828e9c26cb60b8d327d12d6b95b5eb558105f1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-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/18.0/website_sale_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-18-0/e-commerce-18-0-website_sale_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=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to have hidden product prices on the website store.

**Table of contents**

.. contents::
:local:

Configuration
=============

If you want to hide prices at customer level:

1. Go to *Customers* and choose one.
2. Go to *Sales and Purchases* tab.
3. In *Sales* group set *Show prices on website* on or off so this
customer can see them or not. The default value is True, so every
partner website user can see the prices.

For not logged in customers:

1. If you want to have the prices hidden by default when no user is
logged in you should go to Public User's partner and set *Show prices
on website* off. (Remember that the Public User's user and partner
use to be archived).

Hide prices at product level:

1. Go to *Website > Catalog > Products* and choose one.
2. Go to *eCommerce* tab.
3. In the *Shop* section you have the option *Hide prices on website*.
4. You can optionally set a message that will be displayed when the
prices are hidden.

If you want to hide prices at website level

1. Go to *Website > Configuration > Settings* and choose the website to
hide the prices.
2. In the *Shop - Products* section you have the option *Hide prices on
website*

Usage
=====

After configuring the module go to the website store and check your
expected results:

1. On the search box writing the name of a product.
2. On the product list (/shop).
3. On the product page.
4. On the recently viewed products.

You shouldn't be able to either see the prices or buy any of the
forbidden items if any.

Known issues / Roadmap
======================

- This module is incompatible with the website_sale_stock_force_block
module because it makes changes to the same attributes in the
website_sale.products_add_to_cart template.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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 <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_hide_price%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- David Vidal
- Pilar Vargas

- Abraham González <[email protected]>
- Juanjo Algaz <[email protected]>
- \`Factor Libre <https://factorlibre.com>\`:

- Pablo De Andrés <[email protected]>

- \`Sodexis <https://sodexis.com>\`:

- Karthik <[email protected]>

- `Idealis Consulting <https://idealisconsulting.com>`__:

- Sylvain Van Hoof

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 <https://github.com/OCA/e-commerce/tree/18.0/website_sale_hide_price>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions website_sale_hide_price/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions website_sale_hide_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Hide Price",
"version": "18.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"],
"data": [
"data/product_snippet_template_data.xml",
"views/partner_view.xml",
"views/product_template_views.xml",
"views/res_config_settings_views.xml",
"views/website_sale_template.xml",
],
"installable": True,
}
75 changes: 75 additions & 0 deletions website_sale_hide_price/data/product_snippet_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Hide add to cart button and prices from dynamic product snippet templates if not
website_show_price -->
<template
id="price_dynamic_filter_template_product_product"
inherit_id="website_sale.price_dynamic_filter_template_product_product"
>
<xpath expr="//span[hasclass('fw-bold')]" position="before">
<div
id="website_hide_price"
t-if="user_id.partner_id.website_show_price and not data.get('website_hide_price')"
/>
</xpath>
<xpath expr="//div[@id='website_hide_price']" position="inside">
<xpath expr="//span[hasclass('fw-bold')]" position="move" />
<xpath expr="//del" position="move" />
</xpath>
</template>
<!-- The id of the templates is changed so that they do not appear in the selector
repeatedly. The change is from "dynamic_filter_template_%" to "filter_template_dynamic_%". -->
<template
id="filter_template_dynamic_product_product_borderless_2"
inherit_id="website_sale.dynamic_filter_template_product_product_borderless_2"
>
<xpath expr="//button[hasclass('js_add_cart')]" position="attributes">
<attribute name="t-if">
website.website_show_price and not record.website_hide_price
</attribute>
</xpath>
</template>
<template
id="filter_template_dynamic_product_product_add_to_cart"
inherit_id="website_sale.dynamic_filter_template_product_product_add_to_cart"
>
<xpath expr="//button[hasclass('js_add_cart')]" position="attributes">
<attribute name="t-if">
website.website_show_price and not record.website_hide_price
</attribute>
</xpath>
</template>
<template
id="filter_template_dynamic_product_product_horizontal_card"
inherit_id="website_sale.dynamic_filter_template_product_product_horizontal_card"
>
<xpath
expr="//div[hasclass('o_dynamic_snippet_btn_wrapper')]"
position="attributes"
>
<attribute name="t-if">
website.website_show_price and not record.website_hide_price
</attribute>
</xpath>
</template>
<template
id="filter_template_dynamic_product_product_horizontal_card_2"
inherit_id="website_sale.dynamic_filter_template_product_product_horizontal_card_2"
>
<xpath expr="//button[hasclass('js_add_cart')]" position="attributes">
<attribute name="t-if">
website.website_show_price and not record.website_hide_price
</attribute>
</xpath>
</template>
<template
id="filter_template_dynamic_product_product_banner"
inherit_id="website_sale.dynamic_filter_template_product_product_banner"
>
<xpath expr="//button[hasclass('js_add_cart')]" position="attributes">
<attribute name="t-if">
website.website_show_price and not record.website_hide_price
</attribute>
</xpath>
</template>
</odoo>
97 changes: 97 additions & 0 deletions website_sale_hide_price/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_hide_price
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 01:57+0000\n"
"PO-Revision-Date: 2017-12-16 01:57+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_res_partner
msgid "Contact"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_res_config_settings__website_hide_price_default_message
#: model:ir.model.fields,field_description:website_sale_hide_price.field_website__website_hide_price_default_message
msgid "Default Hidden price message"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_product_product__website_hide_price_message
#: model:ir.model.fields,field_description:website_sale_hide_price.field_product_template__website_hide_price_message
msgid "Hidden price message"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,help:website_sale_hide_price.field_res_config_settings__website_hide_price
#: model:ir.model.fields,help:website_sale_hide_price.field_website__website_hide_price
msgid "Hide price at website level"
msgstr ""

#. module: website_sale_hide_price
#: model_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid "Hide prices at website level"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_product_product__website_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_product_template__website_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_res_config_settings__website_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_website__website_hide_price
msgid "Hide prices on website"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_product_template
msgid "Product"
msgstr ""

#. module: website_sale_hide_price
#: model_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid "Set a default text when hiding prices"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_res_partner__website_show_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_res_users__website_show_price
msgid "Show prices on website"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_website
msgid "Website"
msgstr "الموقع"

#. module: website_sale_hide_price
#: model:ir.model.fields,field_description:website_sale_hide_price.field_website__website_show_price
msgid "Website Show Price"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,help:website_sale_hide_price.field_product_product__website_hide_price_message
#: model:ir.model.fields,help:website_sale_hide_price.field_product_template__website_hide_price_message
#: model:ir.model.fields,help:website_sale_hide_price.field_res_config_settings__website_hide_price_default_message
#: model:ir.model.fields,help:website_sale_hide_price.field_website__website_hide_price_default_message
msgid ""
"When the price is hidden on the website we can give the customersome tips on "
"how to find it out."
msgstr ""
Loading
Loading