Skip to content

[ADD] [14.0] website_noindex#1156

Open
gfcapalbo wants to merge 3 commits intoOCA:14.0from
gfcapalbo:14.0-website-noindex
Open

[ADD] [14.0] website_noindex#1156
gfcapalbo wants to merge 3 commits intoOCA:14.0from
gfcapalbo:14.0-website-noindex

Conversation

@gfcapalbo
Copy link
Copy Markdown

@gfcapalbo gfcapalbo commented Jan 9, 2026

we can use the OCA website_no_crawler module to edit robots.txt to disallow certain URL's from being crawled by Odoo. This is however not watertight and Google advises to instead use the tag in the header of a page, to classify it as something that should not be indexed.

Forward-port of https://github.com/kardec-web/odoo-website-addons

@gfcapalbo gfcapalbo added the WIP label Jan 9, 2026
@gfcapalbo gfcapalbo force-pushed the 14.0-website-noindex branch 8 times, most recently from b871da4 to 1c97ec4 Compare January 12, 2026 07:32
"assets": {
"website.assets_editor": [
"website_noindex/static/src/css/styles.css",
"website_noindex/static/src/js/website_editor.js",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfcapalbo I don't see any website_editor.js file defined on website_noindex module.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

"views/website_layout.xml",
"views/website_navbar.xml",
],
"assets": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfcapalbo also in v14.0 I don't think we define assets in manifest like we do in Odoo v16.0. Even if we did, we are doing it twice, both in manifest and also on the assets.xml

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes , removed

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="assets_editor" inherit_id="website.assets_frontend">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfcapalbo maybe rename the id to may the assets_frontend_inherited to make it easier for reviewers/devs to understand it was an inherited adjustment.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

no_index = fields.Boolean(
related="website_id.no_index",
readonly=False,
string="Disallow the site to appear in search engines like Google and Bing.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gfcapalbo I think string is doing what help should do? You can have this as help, and have string short form of the description.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to help= , and shorter "string" attribute.

Copy link
Copy Markdown

@ntsirintanis ntsirintanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a super insignificant comment

title="The site is disallowed to appear in search engines like Google and Bing"
>
<i class="fa fa-warning" />
&#160;Website no indexed</a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not indexed? or no index?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very true. this shows on website. done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not indexed, better

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I just see Website no indexed which sounds wrong

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

525654b
I have put down "not indexed" wich is correct.. I searched for it elsewhere , but it seems fixed now. where do you still see it?

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Copy Markdown

@ntsirintanis ntsirintanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with passion

@gfcapalbo gfcapalbo force-pushed the 14.0-website-noindex branch 2 times, most recently from 8c0dbc5 to 2a3394b Compare March 13, 2026 09:49
@gfcapalbo gfcapalbo force-pushed the 14.0-website-noindex branch from 2a3394b to 51e5baf Compare March 13, 2026 10:51
@gfcapalbo
Copy link
Copy Markdown
Author

@Kiplangatdan @ntsirintanis @KKamaa after rebase pre-commit was failing. it would raise:

from . import base_addons, external_dependencies
File "/home/gio/.cache/pre-commit/repo43vu7kt7/py_env-python3/lib/python3.13/site-packages/setuptools_odoo/base_addons.py", line 8, in <module>
from pkg_resources import resource_string
ModuleNotFoundError: No module named 'pkg_resources'

solved by pinning setuptools<82 in CI.
The CI fix is in a separate commit.
rebased and green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants