Skip to content

Commit b871da4

Browse files
committed
[ADD] [14.0] website_noindex
1 parent 8a0aee0 commit b871da4

15 files changed

Lines changed: 180 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../website_noindex

setup/website_noindex/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

website_noindex/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Website_noindex
2+
3+
## Description
4+
5+
Add the possibility to deactivate website indexation by the search engines like Google
6+
and Bing.
7+
8+
You can activate/deactivate the website indexation by de Website Admin module /
9+
Configuration. Status of indexation for website will appear in top right navbar (if not
10+
indexed there will be a warning info)
11+
12+
## Technical
13+
14+
This module add the "no_index" field on the website module.
15+
16+
## Installation
17+
18+
Download and copy the directory of this module on your odoo-addons directory and install
19+
it. No special requirements are required.
20+
21+
### By git
22+
23+
git clone --depth=1 https://github.com/kardec-web/odoo-website-addons.git

website_noindex/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

website_noindex/__manifest__.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
##############################################################################
2+
#
3+
# Kardec
4+
# Copyright (C) 2016-Today Kardec (<http://www.kardec.net>).
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU Affero General Public License as
8+
# published by the Free Software Foundation, either version 3 of the
9+
# License, or (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Affero General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Affero General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
##############################################################################
20+
{
21+
"name": "Website - no index, no follow",
22+
"version": "14.0.1.0.0",
23+
"category": "Website",
24+
"summary": "Deactivate option for website indexing by search engines",
25+
"license": "AGPL-3",
26+
"author": "Kardec, Therp B.V., Odoo Community Association (OCA)",
27+
"website": "https://github.com/OCA/website",
28+
"depends": ["website"],
29+
"data": [
30+
"views/res_config_settings.xml",
31+
"views/assets.xml",
32+
"views/website_layout.xml",
33+
"views/website_navbar.xml",
34+
],
35+
"assets": {
36+
"website.assets_editor": [
37+
"website_noindex/static/src/css/styles.css",
38+
"website_noindex/static/src/js/website_editor.js",
39+
],
40+
},
41+
"installable": True,
42+
"application": False,
43+
}

website_noindex/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import website

website_noindex/models/website.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from odoo import fields, models
2+
3+
4+
class Website(models.Model):
5+
_inherit = "website"
6+
7+
no_index = fields.Boolean(
8+
string="Disallow the site to appear in search engines like Google and Bing."
9+
)
10+
11+
12+
class WebsiteConfigSettings(models.TransientModel):
13+
_inherit = "res.config.settings"
14+
15+
no_index = fields.Boolean(
16+
related="website_id.no_index",
17+
readonly=False,
18+
string="Disallow the site to appear in search engines like Google and Bing.",
19+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.no-index .fa {
2+
color: #a94442 !important;
3+
}
4+
.no-index.no-index-hidden {
5+
display: none;
6+
}
2.63 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<section class="oe_container">
2+
<div class="oe_row oe_spaced">
3+
<h2 class="oe_slogan" style="color:#A24689;">Website no index</h2>
4+
<h3 class="oe_slogan">Add the possibility to deactivate website indexation by the search engines like Google and Bing.</h3>
5+
<div class="oe_demo oe_picture oe_screenshot">
6+
<img src="odoo-website-addons-noindex.gif">
7+
</div>
8+
</div>
9+
</section>

0 commit comments

Comments
 (0)