Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 03897a0

Browse files
committedMar 5, 2025·
[REF] rename to website_sale_browse_only
1 parent 370d09a commit 03897a0

File tree

16 files changed

+30
-30
lines changed

16 files changed

+30
-30
lines changed
 

‎setup/website_sale_browse_mode/odoo/addons/website_sale_browse_mode

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../website_sale_browse_only

‎website_sale_browse_mode/README.rst ‎website_sale_browse_only/README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
========================
2-
Website Sale Browse Mode
2+
Website Sale Browse Only
33
========================
44

55
..
@@ -17,10 +17,10 @@ Website Sale Browse Mode
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
20-
:target: https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_mode
20+
:target: https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_only
2121
:alt: OCA/e-commerce
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_browse_mode
23+
:target: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_browse_only
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
2626
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=16.0
@@ -29,7 +29,7 @@ Website Sale Browse Mode
2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

3131
Show the shop products but disable shopping.
32-
This module is useful for wholesale company taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
32+
This module is useful for webshops taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
3333
The solution chosen is to remove the "add to cart" button rather than to prevent access to the whole shop, which would be more complicated technically.
3434

3535
**Table of contents**
@@ -43,7 +43,7 @@ Bug Tracker
4343
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/issues>`_.
4444
In case of trouble, please check there if your issue has already been reported.
4545
If you spotted it first, help us to smash it by providing a detailed and welcomed
46-
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_browse_mode%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
46+
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_browse_only%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4747

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

@@ -75,6 +75,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
7575
mission is to support the collaborative development of Odoo features and
7676
promote its widespread use.
7777

78-
This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_mode>`_ project on GitHub.
78+
This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_only>`_ project on GitHub.
7979

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

‎website_sale_browse_mode/__manifest__.py ‎website_sale_browse_only/__manifest__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"name": "Website Sale Browse Mode",
2+
"name": "Website Sale Browse Only",
3+
"summary": "Show the shop products but disable shopping",
34
"version": "16.0.1.0.0",
45
"category": "Website",
56
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
@@ -11,5 +12,4 @@
1112
"views/res_config_settings.xml",
1213
"views/website_sale_template.xml",
1314
],
14-
"installable": True,
1515
}

‎website_sale_browse_mode/models/product_template.py ‎website_sale_browse_only/models/product_template.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ class ProductTemplate(models.Model):
66

77
def _website_show_quick_add(self):
88
website = self.env["website"].get_current_website()
9-
return not website.enable_browse_mode and super()._website_show_quick_add()
9+
return not website.browse_only and super()._website_show_quick_add()

‎website_sale_browse_mode/models/res_config_settings.py ‎website_sale_browse_only/models/res_config_settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class ResConfigSettings(models.TransientModel):
88

99
_inherit = "res.config.settings"
1010

11-
enable_browse_mode = fields.Boolean(
11+
browse_only = fields.Boolean(
1212
help="When checked, users can no longer buy products from the webshop."
1313
"They can only browse the shop and see the products",
14-
related="website_id.enable_browse_mode",
14+
related="website_id.browse_only",
1515
readonly=False,
1616
)

‎website_sale_browse_mode/models/website.py ‎website_sale_browse_only/models/website.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Website(models.Model):
88

99
_inherit = "website"
1010

11-
enable_browse_mode = fields.Boolean(
11+
browse_only = fields.Boolean(
1212
default=False,
1313
help="When checked, users can no longer buy products from the webshop."
1414
"They can only browse the shop and see the products",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Show the shop products but disable shopping.
2-
This module is useful for wholesale company taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
2+
This module is useful for webshops taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
33
The solution chosen is to remove the "add to cart" button rather than to prevent access to the whole shop, which would be more complicated technically.

‎website_sale_browse_mode/static/description/index.html ‎website_sale_browse_only/static/description/index.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>Website Sale Browse Mode</title>
6+
<title>Website Sale Browse Only</title>
77
<style type="text/css">
88

99
/*
@@ -359,18 +359,18 @@
359359
</style>
360360
</head>
361361
<body>
362-
<div class="document" id="website-sale-browse-mode">
363-
<h1 class="title">Website Sale Browse Mode</h1>
362+
<div class="document" id="website-sale-browse-only">
363+
<h1 class="title">Website Sale Browse Only</h1>
364364

365365
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
366366
!! This file is generated by oca-gen-addon-readme !!
367367
!! changes will be overwritten. !!
368368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369369
!! source digest: sha256:e2a8a2bd20985ff73fba3ef9548bdf539500913340f56674331b83490c96b1fb
370370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<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/16.0/website_sale_browse_mode"><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-16-0/e-commerce-16-0-website_sale_browse_mode"><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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371+
<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/16.0/website_sale_browse_only"><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-16-0/e-commerce-16-0-website_sale_browse_only"><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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372372
<p>Show the shop products but disable shopping.
373-
This module is useful for wholesale company taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
373+
This module is useful for webshops taking orders from their clients at specific window of time in the week. They can set the website in browse mode outside these time windows.
374374
The solution chosen is to remove the “add to cart” button rather than to prevent access to the whole shop, which would be more complicated technically.</p>
375375
<p><strong>Table of contents</strong></p>
376376
<div class="contents local topic" id="contents">
@@ -389,7 +389,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
389389
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/e-commerce/issues">GitHub Issues</a>.
390390
In case of trouble, please check there if your issue has already been reported.
391391
If you spotted it first, help us to smash it by providing a detailed and welcomed
392-
<a class="reference external" href="https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_browse_mode%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
392+
<a class="reference external" href="https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_browse_only%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
393393
<p>Do not contact contributors directly about support or help with technical issues.</p>
394394
</div>
395395
<div class="section" id="credits">
@@ -416,7 +416,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
416416
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
417417
mission is to support the collaborative development of Odoo features and
418418
promote its widespread use.</p>
419-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_mode">OCA/e-commerce</a> project on GitHub.</p>
419+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/16.0/website_sale_browse_only">OCA/e-commerce</a> project on GitHub.</p>
420420
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
421421
</div>
422422
</div>

‎website_sale_browse_mode/views/res_config_settings.xml ‎website_sale_browse_only/views/res_config_settings.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
<div id="hide_add_to_cart_setting" position="after">
1111
<div id="is_ecommerce_open" class="col-12 col-md-6 o_setting_box">
1212
<div class="o_setting_left_pane">
13-
<field name="enable_browse_mode" />
13+
<field name="browse_only" />
1414
</div>
1515
<div class="o_setting_right_pane">
16-
<label string="Enable Browse Mode" for="enable_browse_mode" />
16+
<label string="Browse Only" for="browse_only" />
1717
<span
1818
class="fa fa-lg fa-globe"
1919
title="Values set here are website-specific."
2020
groups="website.group_multi_website"
2121
/>
2222
<div class="text-muted">
23-
Enable Browse Mode
23+
Browse Only
2424
</div>
2525

2626
</div>

‎website_sale_browse_mode/views/website.xml ‎website_sale_browse_only/views/website.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<field name="inherit_id" ref="website.view_website_form" />
99
<field name="arch" type="xml">
1010
<field name="default_lang_id" position="after">
11-
<field name="enable_browse_mode" />
11+
<field name="browse_only" />
1212
</field>
1313
</field>
1414
</record>

‎website_sale_browse_mode/views/website_sale_template.xml ‎website_sale_browse_only/views/website_sale_template.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
<template id="product_browse_mode" inherit_id="website_sale.product">
3+
<template id="product_browse_only" inherit_id="website_sale.product">
44
<xpath expr="//div[@id='add_to_cart_wrap']" position="attributes">
55
<attribute name="t-if">
6-
not website.enable_browse_mode
6+
not website.browse_only
77
</attribute>
88
</xpath>
99
</template>
10-
<template id="browse_mode_banner" inherit_id="website.layout">
10+
<template id="browse_only_banner" inherit_id="website.layout">
1111
<xpath expr="//head" position="inside">
12-
<t t-if="website.enable_browse_mode">
12+
<t t-if="website.browse_only">
1313
<div
1414
t-attf-style="
1515
top: 55px;
@@ -25,7 +25,7 @@
2525
</template>
2626
<template id="header_hide_cart_link" inherit_id="website_sale.header_cart_link">
2727
<xpath expr="//t[@t-set='show_cart']" position="after">
28-
<t t-if="website.enable_browse_mode">
28+
<t t-if="website.browse_only">
2929
<t t-set="show_cart" t-value="false" />
3030
</t>
3131
</xpath>

0 commit comments

Comments
 (0)
Please sign in to comment.