diff --git a/google_search_in_odoo/README.rst b/google_search_in_odoo/README.rst new file mode 100755 index 000000000..f2e319469 --- /dev/null +++ b/google_search_in_odoo/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Google Search Systray +===================== +This module will helps to browse anything in Odoo itself + +Installation +============ +- www.odoo.com/documentation/16.0/setup/install.html +- Install our custom addon + +License +------- +Lesser General Public License, Version 3 (LGPL-3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + (V16) Sruthi Pavithran, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@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/google_search_in_odoo/__init__.py b/google_search_in_odoo/__init__.py new file mode 100755 index 000000000..88ceba114 --- /dev/null +++ b/google_search_in_odoo/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sruthi pavithran (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 diff --git a/google_search_in_odoo/__manifest__.py b/google_search_in_odoo/__manifest__.py new file mode 100755 index 000000000..c5060e160 --- /dev/null +++ b/google_search_in_odoo/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sruthi pavithran (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': "Google Search Systray", + 'version': '16.0.1.0.0', + 'category': "Extra Tools", + 'summary': """Manage to browse anything in Odoo itself""", + 'description': """This module will helps to browse anything in + Odoo itself""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'base_setup'], + 'data': [ + 'views/res_config_settings_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'google_search_in_odoo/static/src/xml/google_search.xml', + 'google_search_in_odoo/static/src/js/google_search.js', + 'google_search_in_odoo/static/src/css/google_search.css' + ], + }, + 'license': 'LGPL-3', + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/google_search_in_odoo/doc/RELEASE_NOTES.md b/google_search_in_odoo/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..998a9b186 --- /dev/null +++ b/google_search_in_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.12.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for Google Search Systray diff --git a/google_search_in_odoo/models/__init__.py b/google_search_in_odoo/models/__init__.py new file mode 100755 index 000000000..b3357af86 --- /dev/null +++ b/google_search_in_odoo/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sruthi pavithran (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 res_config_settings diff --git a/google_search_in_odoo/models/res_config_settings.py b/google_search_in_odoo/models/res_config_settings.py new file mode 100755 index 000000000..9741c792e --- /dev/null +++ b/google_search_in_odoo/models/res_config_settings.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Sruthi pavithran (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 . +# +############################################################################### +import requests +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Add field to configuration settings""" + _inherit = 'res.config.settings' + + google_search = fields.Boolean( + string='Allow the users to synchronize the google search', + config_parameter='google_search_in_odoo.enable_google_search', + help="For synchronizing the google search") + ser_client_api = fields.Char( + "API Key", + config_parameter='google_search_in_odoo.ser_client_api', + help="Google search api key") + ser_client_engine = fields.Char( + "Search Engine", + config_parameter='google_search_in_odoo.ser_client_engine', + help="Search engine ID") + + @api.model + def google_search_config(self, input_data): + """Create function to get google custom search api response""" + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'google_search_in_odoo.ser_client_api') + search_engine = self.env['ir.config_parameter'].sudo().get_param( + 'google_search_in_odoo.ser_client_engine') + google_search = self.env['ir.config_parameter'].sudo().get_param( + 'google_search_in_odoo.enable_google_search') + if not google_search: + return { + 'error': 'Please Enable Google Search.' + } + else: + if not api_key and not search_engine: + return { + 'error': 'Please provide API key and Search engine ID.' + } + base_url = 'https://www.googleapis.com/customsearch/v1' + params = { + 'q': input_data, + 'key': api_key, + 'cx': search_engine, + 'num': 10, + } + response = requests.get(base_url, params=params) + if response.status_code == 200: + data = response.json() + items = data.get('items', []) + return items diff --git a/google_search_in_odoo/static/description/assets/icons/chatgpt.png b/google_search_in_odoo/static/description/assets/icons/chatgpt.png new file mode 100644 index 000000000..20a03f9d4 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/chatgpt.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/check.png b/google_search_in_odoo/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/check.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/chevron.png b/google_search_in_odoo/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/chevron.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/close.png b/google_search_in_odoo/static/description/assets/icons/close.png new file mode 100644 index 000000000..f82fed32d Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/close.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/cogs.png b/google_search_in_odoo/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/cogs.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/consultation.png b/google_search_in_odoo/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/consultation.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/ecom-black.png b/google_search_in_odoo/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/education-black.png b/google_search_in_odoo/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/education-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/hotel-black.png b/google_search_in_odoo/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/license.png b/google_search_in_odoo/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/license.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/lifebuoy.png b/google_search_in_odoo/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/manufacturing-black.png b/google_search_in_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/pos-black.png b/google_search_in_odoo/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/pos-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/puzzle.png b/google_search_in_odoo/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/puzzle.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/restaurant-black.png b/google_search_in_odoo/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/service-black.png b/google_search_in_odoo/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/service-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/trading-black.png b/google_search_in_odoo/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/trading-black.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/training.png b/google_search_in_odoo/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/training.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/update.png b/google_search_in_odoo/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/update.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/user.png b/google_search_in_odoo/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/user.png differ diff --git a/google_search_in_odoo/static/description/assets/icons/wrench.png b/google_search_in_odoo/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/wrench.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/categories.png b/google_search_in_odoo/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/categories.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/check-box.png b/google_search_in_odoo/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/check-box.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/compass.png b/google_search_in_odoo/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/compass.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/corporate.png b/google_search_in_odoo/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/corporate.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/customer-support.png b/google_search_in_odoo/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/customer-support.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/cybrosys-logo.png b/google_search_in_odoo/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/cybrosys-logo.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/features.png b/google_search_in_odoo/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/features.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/logo.png b/google_search_in_odoo/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/logo.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/pictures.png b/google_search_in_odoo/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/pictures.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/pie-chart.png b/google_search_in_odoo/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/pie-chart.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/right-arrow.png b/google_search_in_odoo/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/right-arrow.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/star.png b/google_search_in_odoo/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/star.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/support.png b/google_search_in_odoo/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/support.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/whatsapp.png b/google_search_in_odoo/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/whatsapp.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/1.png b/google_search_in_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..6c8c8adc3 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/1.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/2.png b/google_search_in_odoo/static/description/assets/modules/2.png new file mode 100644 index 000000000..f0e8c3a16 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/2.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/3.png b/google_search_in_odoo/static/description/assets/modules/3.png new file mode 100644 index 000000000..7ec7cfbc3 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/3.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/4.png b/google_search_in_odoo/static/description/assets/modules/4.png new file mode 100644 index 000000000..17ba4d75f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/4.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/5.png b/google_search_in_odoo/static/description/assets/modules/5.png new file mode 100644 index 000000000..f24bdfacb Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/5.png differ diff --git a/google_search_in_odoo/static/description/assets/modules/6.png b/google_search_in_odoo/static/description/assets/modules/6.png new file mode 100644 index 000000000..da4a6d9e6 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/modules/6.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/1.png b/google_search_in_odoo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/1.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_01.png b/google_search_in_odoo/static/description/assets/screenshots/google_01.png new file mode 100644 index 000000000..171fce9d2 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_01.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_02.png b/google_search_in_odoo/static/description/assets/screenshots/google_02.png new file mode 100644 index 000000000..2e0bfec43 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_02.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_03.png b/google_search_in_odoo/static/description/assets/screenshots/google_03.png new file mode 100644 index 000000000..43ba3390d Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_03.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_04.png b/google_search_in_odoo/static/description/assets/screenshots/google_04.png new file mode 100644 index 000000000..6380def8e Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_04.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_search_01.png b/google_search_in_odoo/static/description/assets/screenshots/google_search_01.png new file mode 100644 index 000000000..420611822 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_search_01.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_search_02.png b/google_search_in_odoo/static/description/assets/screenshots/google_search_02.png new file mode 100644 index 000000000..28ca3280f Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_search_02.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_search_03.png b/google_search_in_odoo/static/description/assets/screenshots/google_search_03.png new file mode 100644 index 000000000..add6f8858 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_search_03.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_search_04.png b/google_search_in_odoo/static/description/assets/screenshots/google_search_04.png new file mode 100644 index 000000000..81de087bf Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_search_04.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/google_search_05.png b/google_search_in_odoo/static/description/assets/screenshots/google_search_05.png new file mode 100644 index 000000000..cf392d86a Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/google_search_05.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/hero.gif b/google_search_in_odoo/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..084303554 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/hero.gif differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/search.png b/google_search_in_odoo/static/description/assets/screenshots/search.png new file mode 100644 index 000000000..6f9bb9e36 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/search.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/search1.png b/google_search_in_odoo/static/description/assets/screenshots/search1.png new file mode 100644 index 000000000..15eaab5d6 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/search1.png differ diff --git a/google_search_in_odoo/static/description/banner.jpg b/google_search_in_odoo/static/description/banner.jpg new file mode 100644 index 000000000..c2a7ff621 Binary files /dev/null and b/google_search_in_odoo/static/description/banner.jpg differ diff --git a/google_search_in_odoo/static/description/icon.png b/google_search_in_odoo/static/description/icon.png new file mode 100644 index 000000000..8cc7e2d84 Binary files /dev/null and b/google_search_in_odoo/static/description/icon.png differ diff --git a/google_search_in_odoo/static/description/index.html b/google_search_in_odoo/static/description/index.html new file mode 100644 index 000000000..2aaf30f56 --- /dev/null +++ b/google_search_in_odoo/static/description/index.html @@ -0,0 +1,659 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+

+ Google Search Systray

+

+ Manage to Browse Anything in Odoo Itself

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module will help to browse anything in Odoo itself. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+ +
+ + Available in Odoo 16.0 Community & Enterprise +
+
+ + Access Google Search in Systray +
+
+ + Easy to Set up API Key and Client Search Engine of Google Search +
+
+ + You Can Simply type your Question and get Answers from Google to Odoo Interface +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Google Search Integration with Odoo +

+

+ For Generating Credentials Click the button and go to + (https://developers.google.com/custom-search/v1/overview) + Platform.

+ +

+ Click on the Get a Key option to get the Api. + +

+ Create a new Project to Get the Key.

+ +

+ Create a new Project to Get the Key.

+ +

+ Click on the Programmable Search Engine Control Panel for + Getting Search Engine ID

+ +

+ Create a new Programmable Search Engine/p> + +

+ Create a new Programmable Search Engine

+ +

+ Enter the Api Credentials.

+ +

+ We can access Google Search from systray.

+ +

+ When the credentials are null and also the response null an + error popup arises.

+ +

+ When we're clicking on systray we can have an input interface + for entering the question and getting the response from Google + Search.

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

+ Related + Products +

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

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

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

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ \ No newline at end of file diff --git a/google_search_in_odoo/static/src/css/google_search.css b/google_search_in_odoo/static/src/css/google_search.css new file mode 100755 index 000000000..208d83e11 --- /dev/null +++ b/google_search_in_odoo/static/src/css/google_search.css @@ -0,0 +1,75 @@ +.toggle-icon{ +padding: 10px; +margin-bottom: 18px; +} +.search{ + + border-top-right-radius: 32px !important; + border-bottom-right-radius: 32px !important; + background-color: #fff; +} +.google{ + + border-top-left-radius: 32px !important; + border-bottom-left-radius: 32px !important; + background-color: #fff; + +} +.input-group-prepend { + margin-right: -2px !important; +} +.input-group-append { + margin-left: -2px !important; +} +.form-control:focus { + color: #495057; + background-color: #fff; + border-color: #ced4da; + outline: 0; + box-shadow: 0 0 0 0 !important; + +} +.form-control{ + border-right: 0 !important; + border-left: 0 !important; + background-color: #fff; +} +.container { + position: relative; + width: 100%; + overflow: hidden; + /* 16:9 Aspect Ratio */ +} +.google_result{ + background-color: #fff; + width: 500px; + height: 500px; + z-index:2; + position: absolute; + margin-top:28px; + border: 4px solid black; + overflow: auto; +} +.google_result > div { + background-color: #fff; + border: 1px solid #ccc; + padding: 10px; + margin: 10px 0; + border-radius: 4px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); +} +.header { + font-size: 1.5rem; + font-weight: bold; +} +.link { + color: #1a0dab; + text-decoration: underline; +} +.link:hover { + color: #0d0d0d; +} +.content { + font-size: 0.9rem; + color: #545454; +} \ No newline at end of file diff --git a/google_search_in_odoo/static/src/js/google_search.js b/google_search_in_odoo/static/src/js/google_search.js new file mode 100755 index 000000000..db3e66094 --- /dev/null +++ b/google_search_in_odoo/static/src/js/google_search.js @@ -0,0 +1,64 @@ +/** @odoo-module **/ +import SystrayMenu from 'web.SystrayMenu'; +import Widget from 'web.Widget'; +import { _t } from "@web/core/l10n/translation"; +import Dialog from 'web.Dialog'; +var rpc = require('web.rpc'); + +var GoogleSearchWidget = Widget.extend({ + template: 'SearchSystray', + events: { + 'keydown #search_text': '_onClick', + }, + /** + * @override + */ + init: function () { + this._super.apply(this, arguments); + }, + + _onClick: function (event) { + // Get response from google based on the search value and display result on the template + var input = this.$el.find('#search_text')[0]; + const resultsDiv = this.$el.find('.google_result')[0]; + if (event.key === "Enter" && input.value.trim() !== '') { + rpc.query({ + model: 'res.config.settings', + method: 'google_search_config', + args: [input.value], + }).then(result => { + if (result.error) { + Dialog.alert(this, _t(result.error)); + } else if (result === null) { + Dialog.alert(this, _t('Limit exceeded for Queries and Queries per day')); + } else { + resultsDiv.innerHTML = ''; + for (let i = 0; i < result.length; i++) { + const resultItem = document.createElement("div"); + const titleText = document.createTextNode(result[i].title); + const titleElement = document.createElement("h2"); + titleElement.classList.add("header") + titleElement.appendChild(titleText); + const linkElement = document.createElement("a"); + linkElement.classList.add("link") + linkElement.href = result[i].link; + linkElement.textContent = result[i].link; + const snippetText = document.createTextNode(result[i].snippet); + const snippetElement = document.createElement("p"); + snippetElement.classList.add("content") + snippetElement.appendChild(snippetText); + resultItem.appendChild(titleElement); + resultItem.appendChild(linkElement); + resultItem.appendChild(snippetElement); + resultsDiv.appendChild(resultItem); + } + resultsDiv.style.display = 'block'; + } + }); + } else { + resultsDiv.style.display = 'none'; + } + } +}); +SystrayMenu.Items.push(GoogleSearchWidget); +export default GoogleSearchWidget; diff --git a/google_search_in_odoo/static/src/xml/google_search.xml b/google_search_in_odoo/static/src/xml/google_search.xml new file mode 100755 index 000000000..2b3629282 --- /dev/null +++ b/google_search_in_odoo/static/src/xml/google_search.xml @@ -0,0 +1,28 @@ + + + + +
+ + + + + diff --git a/google_search_in_odoo/views/res_config_settings_views.xml b/google_search_in_odoo/views/res_config_settings_views.xml new file mode 100755 index 000000000..c7a446da4 --- /dev/null +++ b/google_search_in_odoo/views/res_config_settings_views.xml @@ -0,0 +1,55 @@ + + + + + + res.config.settings.view.form.inherit.google.search.in.odoo + + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+