diff --git a/index_and_follow/README.rst b/index_and_follow/README.rst new file mode 100644 index 000000000..e65ea0a52 --- /dev/null +++ b/index_and_follow/README.rst @@ -0,0 +1,44 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Website Index and Follow +======================= +This module lets you specify whether or not a particular page should be indexed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Ayisha Sumayya K @cybrosys, Contact: odoo@cybrosys.com + + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) + + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/index_and_follow/__init__.py b/index_and_follow/__init__.py new file mode 100644 index 000000000..5767ff2b6 --- /dev/null +++ b/index_and_follow/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import controllers diff --git a/index_and_follow/__manifest__.py b/index_and_follow/__manifest__.py new file mode 100644 index 000000000..ccee4f4fb --- /dev/null +++ b/index_and_follow/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Website Index and Follow', + 'version': '16.0.1.0.0', + 'category': 'Website/Website', + 'summary': """Website Index and Follow Application for Odoo 16""", + 'description': """The module helps you to specify product-level + indexing.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website_sale'], + 'data': [ + 'views/source_views.xml', + 'views/website_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'index_and_follow/static/src/js/website.js', ], + }, + 'images': ['static/description/banner.png', ], + 'license': 'LGPL-3', + 'auto_install': False, + 'installable': True, + 'application': False +} diff --git a/index_and_follow/controllers/__init__.py b/index_and_follow/controllers/__init__.py new file mode 100644 index 000000000..1330a9539 --- /dev/null +++ b/index_and_follow/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import website diff --git a/index_and_follow/controllers/website.py b/index_and_follow/controllers/website.py new file mode 100644 index 000000000..11abe5307 --- /dev/null +++ b/index_and_follow/controllers/website.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebIndexJson(http.Controller): + """ controller for website index and follow """ + + @http.route('/web_index', type='json', auth='user') + def web_index(self, index, product): + """ route for index """ + + product_rec = request.env['product.template'].browse(int(product)) + if index: + product_rec.is_index = True + else: + product_rec.is_index = False + + +class WebIndex(WebsiteSale): + """ class for website_sale """ + + def _prepare_product_values(self, product, category, search, **kwargs): + """ function for access user along with product """ + + res = super(WebIndex, self)._prepare_product_values(product, category, + search) + res.update({ + 'page_index': product.is_index, + 'product_rec': product, + 'user': request.env.user.has_group('base.group_user') + }) + return res diff --git a/index_and_follow/doc/RELEASE_NOTES.md b/index_and_follow/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..04c507d65 --- /dev/null +++ b/index_and_follow/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 18.02.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Website Index and Follow diff --git a/index_and_follow/models/__init__.py b/index_and_follow/models/__init__.py new file mode 100644 index 000000000..baf44946a --- /dev/null +++ b/index_and_follow/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import product_template diff --git a/index_and_follow/models/product_template.py b/index_and_follow/models/product_template.py new file mode 100644 index 000000000..d0f2c3af8 --- /dev/null +++ b/index_and_follow/models/product_template.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayisha Sumayya K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """ class for adding a field in product """ + + _inherit = "product.template" + + is_index = fields.Boolean(default=True) diff --git a/index_and_follow/static/description/assets/cybro-icon.png b/index_and_follow/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/index_and_follow/static/description/assets/cybro-icon.png differ diff --git a/index_and_follow/static/description/assets/cybro-odoo.png b/index_and_follow/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/index_and_follow/static/description/assets/cybro-odoo.png differ diff --git a/index_and_follow/static/description/assets/icons/1-icon.png b/index_and_follow/static/description/assets/icons/1-icon.png new file mode 100644 index 000000000..065e0875a Binary files /dev/null and b/index_and_follow/static/description/assets/icons/1-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/2-icon.png b/index_and_follow/static/description/assets/icons/2-icon.png new file mode 100644 index 000000000..546c50477 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/2-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/3-icon.png b/index_and_follow/static/description/assets/icons/3-icon.png new file mode 100644 index 000000000..3dccb7a0c Binary files /dev/null and b/index_and_follow/static/description/assets/icons/3-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/4-icon.png b/index_and_follow/static/description/assets/icons/4-icon.png new file mode 100644 index 000000000..790c3f7f8 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/4-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/5-icon.png b/index_and_follow/static/description/assets/icons/5-icon.png new file mode 100644 index 000000000..e86176a20 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/5-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/6-icon.png b/index_and_follow/static/description/assets/icons/6-icon.png new file mode 100644 index 000000000..0d95de026 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/6-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/Hospital Management-icon.png b/index_and_follow/static/description/assets/icons/Hospital Management-icon.png new file mode 100644 index 000000000..1e63215f3 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/Hospital Management-icon.png differ diff --git a/index_and_follow/static/description/assets/icons/check.png b/index_and_follow/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/index_and_follow/static/description/assets/icons/check.png differ diff --git a/index_and_follow/static/description/assets/icons/chevron.png b/index_and_follow/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/chevron.png differ diff --git a/index_and_follow/static/description/assets/icons/cogs.png b/index_and_follow/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/cogs.png differ diff --git a/index_and_follow/static/description/assets/icons/consultation.png b/index_and_follow/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/index_and_follow/static/description/assets/icons/consultation.png differ diff --git a/index_and_follow/static/description/assets/icons/down.svg b/index_and_follow/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/index_and_follow/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index_and_follow/static/description/assets/icons/ecom-black.png b/index_and_follow/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/ecom-black.png differ diff --git a/index_and_follow/static/description/assets/icons/education-black.png b/index_and_follow/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/index_and_follow/static/description/assets/icons/education-black.png differ diff --git a/index_and_follow/static/description/assets/icons/hotel-black.png b/index_and_follow/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/index_and_follow/static/description/assets/icons/hotel-black.png differ diff --git a/index_and_follow/static/description/assets/icons/license.png b/index_and_follow/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/index_and_follow/static/description/assets/icons/license.png differ diff --git a/index_and_follow/static/description/assets/icons/lifebuoy.png b/index_and_follow/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/index_and_follow/static/description/assets/icons/lifebuoy.png differ diff --git a/index_and_follow/static/description/assets/icons/manufacturing-black.png b/index_and_follow/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/index_and_follow/static/description/assets/icons/manufacturing-black.png differ diff --git a/index_and_follow/static/description/assets/icons/pos-black.png b/index_and_follow/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/pos-black.png differ diff --git a/index_and_follow/static/description/assets/icons/puzzle.png b/index_and_follow/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/puzzle.png differ diff --git a/index_and_follow/static/description/assets/icons/restaurant-black.png b/index_and_follow/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/restaurant-black.png differ diff --git a/index_and_follow/static/description/assets/icons/service-black.png b/index_and_follow/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/index_and_follow/static/description/assets/icons/service-black.png differ diff --git a/index_and_follow/static/description/assets/icons/support.png b/index_and_follow/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/support.png differ diff --git a/index_and_follow/static/description/assets/icons/trading-black.png b/index_and_follow/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/trading-black.png differ diff --git a/index_and_follow/static/description/assets/icons/training.png b/index_and_follow/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/index_and_follow/static/description/assets/icons/training.png differ diff --git a/index_and_follow/static/description/assets/icons/update.png b/index_and_follow/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/index_and_follow/static/description/assets/icons/update.png differ diff --git a/index_and_follow/static/description/assets/icons/user.png b/index_and_follow/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/index_and_follow/static/description/assets/icons/user.png differ diff --git a/index_and_follow/static/description/assets/icons/whatsapp.png b/index_and_follow/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/index_and_follow/static/description/assets/icons/whatsapp.png differ diff --git a/index_and_follow/static/description/assets/icons/wrench.png b/index_and_follow/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/index_and_follow/static/description/assets/icons/wrench.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot1.png b/index_and_follow/static/description/assets/screenshots/Screenshot1.png new file mode 100644 index 000000000..f8fa701a2 Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot1.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot2.png b/index_and_follow/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..a1caf1269 Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot2.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot3.png b/index_and_follow/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..90ad1cda3 Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot3.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot4.png b/index_and_follow/static/description/assets/screenshots/Screenshot4.png new file mode 100644 index 000000000..41818fa78 Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot4.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot5.png b/index_and_follow/static/description/assets/screenshots/Screenshot5.png new file mode 100644 index 000000000..79da680f1 Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot5.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot6.png b/index_and_follow/static/description/assets/screenshots/Screenshot6.png new file mode 100644 index 000000000..994d3f9de Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot6.png differ diff --git a/index_and_follow/static/description/assets/screenshots/Screenshot7.png b/index_and_follow/static/description/assets/screenshots/Screenshot7.png new file mode 100644 index 000000000..111b30b9d Binary files /dev/null and b/index_and_follow/static/description/assets/screenshots/Screenshot7.png differ diff --git a/index_and_follow/static/description/assets/y18.jpg b/index_and_follow/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/index_and_follow/static/description/assets/y18.jpg differ diff --git a/index_and_follow/static/description/banner.png b/index_and_follow/static/description/banner.png new file mode 100644 index 000000000..dda9b96e1 Binary files /dev/null and b/index_and_follow/static/description/banner.png differ diff --git a/index_and_follow/static/description/icon.png b/index_and_follow/static/description/icon.png new file mode 100644 index 000000000..eae4aeaf9 Binary files /dev/null and b/index_and_follow/static/description/icon.png differ diff --git a/index_and_follow/static/description/index.html b/index_and_follow/static/description/index.html new file mode 100644 index 000000000..e2ff0be13 --- /dev/null +++ b/index_and_follow/static/description/index.html @@ -0,0 +1,1447 @@ + +
+
+
+

+ Website Index and Follow + +

+

+ This systems specify how the product-level settings can be used + to adjust how Google presents your content in search results.

+
+ + +
+

+ Website Index and Follow is an application which is used to + maintain the Google search results. You can specify product-level settings by including + a meta tag on HTML pages or in an HTTP header. + The robots meta tag lets you utilize a granular, product-specific approach to controlling + how an individual product should be indexed and served to users in Google Search results. + Place the robots meta tag in the head section of a given page. +

+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +

+ Screenshots

+ + +

+ Website Index and Follow

+
+ +
+

+ An option 'Is Indexed' for Internal Users

+

Internal user can enable the checkbox 'Is indexed' if they want to index the product
+

+ + +
+ +
+
+

+ After Enabling The Option, Click View Frame Source

+

+ +
+ + +
+ +
+
+

+ A Meta tag will be added inside the Header tag +

+

+ +
+ + +
+ +
+ + + + + +
+

+ If 'Is Indexed' is Unchecked +

+

+ +
+ +
+
+ +
+ + + + + +
+

View Frame Source After Disabling 'Is indexed'

+

+ +
+ + +
+ +
+
+

+ + Another Meta tag will be added to the Header tag

+

+
+ + +
+ +
+
+

+ Portal User and Public Users has NO ACCESS to the 'Is Indexed' Checkbox +

+

+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Related Modules

+

Explore our related modules

+
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+

+ Our Services +

+
+ + +
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + +
+ + +
+
+
+

Our Industries

+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+
+

Support

+

Need help? Get in touch. +

+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get + in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 + 86068 + 27707

+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/index_and_follow/static/src/js/website.js b/index_and_follow/static/src/js/website.js new file mode 100644 index 000000000..312bcb006 --- /dev/null +++ b/index_and_follow/static/src/js/website.js @@ -0,0 +1,41 @@ +odoo.define('index_and_follow.index', function (require) { +'use strict'; + + var ajax = require('web.ajax'); + var publicWidget = require('web.public.widget'); + + publicWidget.registry.IndexAndFollow = publicWidget.Widget.extend({ + selector: '#product_detail_main', + events: { + 'change .is_index': '_setProductIndex', + }, + _setProductIndex: function(event){ + //function to set product index + var product = this.el.querySelector('.product').value; + if (event.target.checked == true){ + /*check index input is checked, if input is checked, it sends an AJAX request + to the server to set the product's indexing status to true.*/ + this.el.querySelector('.is_index').checked = true; + ajax.jsonRpc('/web_index', 'call',{ + 'index': true, + 'product': product, + }).then(function(){ + location.reload(); + }); + } + else{ + //input is unchecked, it sends an AJAX request to set the status to false. + ajax.jsonRpc('/web_index', 'call',{ + 'index': false, + 'product': product, + }).then(function(){ + location.reload(); + }); + } + + }, + }); + + return publicWidget.registry.IndexAndFollow; + + }); diff --git a/index_and_follow/views/source_views.xml b/index_and_follow/views/source_views.xml new file mode 100644 index 000000000..bc43b5653 --- /dev/null +++ b/index_and_follow/views/source_views.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/index_and_follow/views/website_views.xml b/index_and_follow/views/website_views.xml new file mode 100644 index 000000000..80cd9aec0 --- /dev/null +++ b/index_and_follow/views/website_views.xml @@ -0,0 +1,14 @@ + + + + + +