-
-
Notifications
You must be signed in to change notification settings - Fork 730
[ADD] [14.0] website_noindex #1156
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
base: 14.0
Are you sure you want to change the base?
Conversation
afb23f8 to
7ef57ae
Compare
How to reproduce the issue:
1. Create a CRON with code "env.cr.execute('SELECT not_a_field FROM res_users')"
2. Manually Execute the CRON
Expected behavior:
The Exception is shown in the UI
Actual behavior:
The "Disconnected" notification is briefly shown, and right after a "Connected" notification is shown
02cd15a to
b871da4
Compare
b871da4 to
1c97ec4
Compare
website_noindex/__manifest__.py
Outdated
| "assets": { | ||
| "website.assets_editor": [ | ||
| "website_noindex/static/src/css/styles.css", | ||
| "website_noindex/static/src/js/website_editor.js", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
website_noindex/__manifest__.py
Outdated
| "views/website_layout.xml", | ||
| "views/website_navbar.xml", | ||
| ], | ||
| "assets": { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes , removed
website_noindex/views/assets.xml
Outdated
| @@ -0,0 +1,12 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <odoo> | |||
| <template id="assets_editor" inherit_id="website.assets_frontend"> | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
website_noindex/models/website.py
Outdated
| no_index = fields.Boolean( | ||
| related="website_id.no_index", | ||
| readonly=False, | ||
| string="Disallow the site to appear in search engines like Google and Bing.", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
ntsirintanis
left a comment
There was a problem hiding this 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" /> | ||
|  Website no indexed</a> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not indexed, better
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
|
This PR has the |
ntsirintanis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with passion
we can use the OCA
website_no_crawlermodule to editrobots.txtto 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