Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 12 additions & 1 deletion website_sale_hide_price/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Website Sale Hide Price
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:801dff459466a77edac836cad22c5c0d6f28b7670fe350ba9c73c5d994433273
!! source digest: sha256:b96713ac3e2b91379d2cb265287afb05ac64f63a8d89d7039dbb656f886cf4a5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -60,6 +60,13 @@ Hide prices at product level:
#. You can optionally set a message that will be displayed when the prices are
hidden.

Hidden price message option at website level:

#. Go to *Website > Configuration > Settings*.
#. Enable *Show hidden price message to public users* if you also want public
(not logged-in) users to see the hidden price message. By default the message
is only shown to logged-in users.

Usage
=====

Expand Down Expand Up @@ -111,6 +118,10 @@ Contributors
* Abraham González <abraham@trey.es>
* Juanjo Algaz <jalgaz@gmail.com>

* `Quartile <https://www.quartile.co>`__:

* Shinnosuke Morita

Maintainers
~~~~~~~~~~~

Expand Down
51 changes: 41 additions & 10 deletions website_sale_hide_price/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_hide_price
# * website_sale_hide_price
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 15.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 01:57+0000\n"
"PO-Revision-Date: 2023-05-26 04:19+0000\n"
"Last-Translator: Yoshi Tashiro <tashiro@roomsfor.hk>\n"
"Language-Team: Japanese (https://www.transifex.com/oca/teams/23907/ja/)\n"
"POT-Creation-Date: 2026-06-11 02:06+0000\n"
"PO-Revision-Date: 2026-06-11 02:06+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.17\n"
"Plural-Forms: \n"

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_res_config_settings
Expand All @@ -41,6 +38,11 @@ msgstr "デフォルト価格非表示メッセージ"
msgid "Hidden price message"
msgstr "価格非表示メッセージ"

#. module: website_sale_hide_price
#: model_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid "Hidden price message options"
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
Expand All @@ -57,12 +59,25 @@ msgstr "プロダクトテンプレート"
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_config_settings__show_hide_price_message_to_public
#: model:ir.model.fields,field_description:website_sale_hide_price.field_website__show_hide_price_message_to_public
msgid "Show hidden price message to public users"
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_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid ""
"Show the hidden price message to public\n"
" (not logged-in) users"
msgstr "価格非表示メッセージをパブリック(ログインしていない)ユーザに表示"

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_website
msgid "Website"
Expand All @@ -73,6 +88,15 @@ msgstr "ウェブサイト"
msgid "Website Show Price"
msgstr "ウェブサイト価格表示"

#. module: website_sale_hide_price
#: model:ir.model.fields,help:website_sale_hide_price.field_res_config_settings__show_hide_price_message_to_public
#: model:ir.model.fields,help:website_sale_hide_price.field_website__show_hide_price_message_to_public
msgid ""
"When enabled, the hidden price message set on each product (or the default "
"one) is also shown to public (not logged-in) users. By default it is only "
"shown to logged-in users."
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
Expand All @@ -82,3 +106,10 @@ msgid ""
"When the price is hidden on the website we can give the customersome tips on"
" how to find it out."
msgstr "ウェブサイトで価格が非表示の際に顧客を誘導するメッセージを出すことができます。"

#. module: website_sale_hide_price
#. openerp-web
#: code:addons/website_sale_hide_price/static/src/xml/website_sale_templates.xml:0
#, python-format
msgid "widget.displayPrice & !product.website_hide_price"
msgstr ""
34 changes: 34 additions & 0 deletions website_sale_hide_price/i18n/website_sale_hide_price.pot
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ msgstr ""
msgid "Hidden price message"
msgstr ""

#. module: website_sale_hide_price
#: model_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid "Hidden price message options"
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
Expand All @@ -51,12 +56,25 @@ msgstr ""
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_config_settings__show_hide_price_message_to_public
#: model:ir.model.fields,field_description:website_sale_hide_price.field_website__show_hide_price_message_to_public
msgid "Show hidden price message to public users"
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_terms:ir.ui.view,arch_db:website_sale_hide_price.res_config_settings_view_form
msgid ""
"Show the hidden price message to public\n"
" (not logged-in) users"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model,name:website_sale_hide_price.model_website
msgid "Website"
Expand All @@ -67,6 +85,15 @@ msgstr ""
msgid "Website Show Price"
msgstr ""

#. module: website_sale_hide_price
#: model:ir.model.fields,help:website_sale_hide_price.field_res_config_settings__show_hide_price_message_to_public
#: model:ir.model.fields,help:website_sale_hide_price.field_website__show_hide_price_message_to_public
msgid ""
"When enabled, the hidden price message set on each product (or the default "
"one) is also shown to public (not logged-in) users. By default it is only "
"shown to logged-in users."
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
Expand All @@ -76,3 +103,10 @@ msgid ""
"When the price is hidden on the website we can give the customersome tips on"
" how to find it out."
msgstr ""

#. module: website_sale_hide_price
#. openerp-web
#: code:addons/website_sale_hide_price/static/src/xml/website_sale_templates.xml:0
#, python-format
msgid "widget.displayPrice & !product.website_hide_price"
msgstr ""
5 changes: 5 additions & 0 deletions website_sale_hide_price/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2022 Tecnativa - David Vidal
# Copyright 2026 Quartile (https://www.quartile.co)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import fields, models

Expand All @@ -10,3 +11,7 @@ class ResConfigSettings(models.TransientModel):
related="website_id.website_hide_price_default_message",
readonly=False,
)
show_hide_price_message_to_public = fields.Boolean(
related="website_id.show_hide_price_message_to_public",
readonly=False,
)
7 changes: 7 additions & 0 deletions website_sale_hide_price/models/website.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2026 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models
Expand All @@ -15,6 +16,12 @@ class Website(models.Model):
"some tips on how to find it out.",
translate=True,
)
show_hide_price_message_to_public = fields.Boolean(
string="Show hidden price message to public users",
help="When enabled, the hidden price message set on each product (or the"
" default one) is also shown to public (not logged-in) users. By default"
" it is only shown to logged-in users.",
)

def _compute_website_show_price(self):
for rec in self:
Expand Down
7 changes: 7 additions & 0 deletions website_sale_hide_price/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ Hide prices at product level:
#. In the *Shop* section you have the option *Hide prices on website*.
#. You can optionally set a message that will be displayed when the prices are
hidden.

Hidden price message option at website level:

#. Go to *Website > Configuration > Settings*.
#. Enable *Show hidden price message to public users* if you also want public
(not logged-in) users to see the hidden price message. By default the message
is only shown to logged-in users.
4 changes: 4 additions & 0 deletions website_sale_hide_price/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@

* Abraham González <abraham@trey.es>
* Juanjo Algaz <jalgaz@gmail.com>

* `Quartile <https://www.quartile.co>`__:

* Shinnosuke Morita
14 changes: 12 additions & 2 deletions website_sale_hide_price/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,7 +366,7 @@ <h1 class="title">Website Sale Hide Price</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:801dff459466a77edac836cad22c5c0d6f28b7670fe350ba9c73c5d994433273
!! source digest: sha256:b96713ac3e2b91379d2cb265287afb05ac64f63a8d89d7039dbb656f886cf4a5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/e-commerce/tree/15.0/website_sale_hide_price"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_hide_price"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to have hidden product prices on the website store.</p>
Expand Down Expand Up @@ -410,6 +409,13 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<li>You can optionally set a message that will be displayed when the prices are
hidden.</li>
</ol>
<p>Hidden price message option at website level:</p>
<ol class="arabic simple">
<li>Go to <em>Website &gt; Configuration &gt; Settings</em>.</li>
<li>Enable <em>Show hidden price message to public users</em> if you also want public
(not logged-in) users to see the hidden price message. By default the message
is only shown to logged-in users.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
Expand Down Expand Up @@ -459,6 +465,10 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
</li>
<li>Abraham González &lt;<a class="reference external" href="mailto:abraham&#64;trey.es">abraham&#64;trey.es</a>&gt;</li>
<li>Juanjo Algaz &lt;<a class="reference external" href="mailto:jalgaz&#64;gmail.com">jalgaz&#64;gmail.com</a>&gt;</li>
<li><a class="reference external" href="https://www.quartile.co">Quartile</a>:<ul>
<li>Shinnosuke Morita</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
38 changes: 26 additions & 12 deletions website_sale_hide_price/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,34 @@
<field name="inherit_id" ref="website_sale.res_config_settings_view_form" />
<field name="arch" type="xml">
<div id="sale_product_catalog_settings" position="inside">
<div
class="col-12 col-lg-6 o_setting_box"
id="website_sale_hide_price"
title="Set a default text when hiding prices"
>
<div class="o_setting_left_pane">

<div class="col-12 col-lg-6">
<div
class="o_setting_box"
id="website_hide_price_default_message_setting"
title="Hidden price message options"
>
<div class="o_setting_right_pane">
<label for="website_hide_price_default_message" />
<div class="text-muted">
Set a default text when hiding prices
</div>
<field name="website_hide_price_default_message" />
</div>
</div>
<div class="o_setting_right_pane">
<label for="website_hide_price_default_message" />
<div class="text-muted">
Set a default text when hiding prices
<div
class="o_setting_box"
id="show_hide_price_message_to_public_setting"
>
<div class="o_setting_left_pane">
<field name="show_hide_price_message_to_public" />
</div>
<div class="o_setting_right_pane">
<label for="show_hide_price_message_to_public" />
<div class="text-muted">
Show the hidden price message to public
(not logged-in) users
</div>
</div>
<field name="website_hide_price_default_message" />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion website_sale_hide_price/views/website_sale_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<t t-set="user_authenticated" t-value="user_id != website.user_id" />
<div
class="alert alert-info"
t-if="product.website_hide_price and (product.website_hide_price_message or website.website_hide_price_default_message) and user_authenticated"
t-if="product.website_hide_price and (product.website_hide_price_message or website.website_hide_price_default_message) and (user_authenticated or website.show_hide_price_message_to_public)"
>
<i class="fa fa-info-circle" /> <span
t-esc="product.website_hide_price_message or website.website_hide_price_default_message"
Expand Down
Loading