diff --git a/google_search_in_odoo/README.rst b/google_search_in_odoo/README.rst new file mode 100755 index 000000000..a920392d4 --- /dev/null +++ b/google_search_in_odoo/README.rst @@ -0,0 +1,44 @@ +.. 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 + +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, + (V17) Jumana Haseen, +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..58b33e487 --- /dev/null +++ b/google_search_in_odoo/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (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..af3680b80 --- /dev/null +++ b/google_search_in_odoo/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (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': '17.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..eaee7e81b --- /dev/null +++ b/google_search_in_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.05.2024 +#### Version 17.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..1e9437ed8 --- /dev/null +++ b/google_search_in_odoo/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (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..f839525ad --- /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) 2024-TODAY Cybrosys Technologies() +# Author: Jumana Haseen (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.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.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/capture (1).png b/google_search_in_odoo/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/capture (1).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 100644 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 100644 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/cogs.png b/google_search_in_odoo/static/description/assets/icons/cogs.png new file mode 100644 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 100644 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 100644 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 100644 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 100644 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/img.png b/google_search_in_odoo/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/img.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 100644 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 100644 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 100644 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/photo-capture.png b/google_search_in_odoo/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/icons/photo-capture.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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/Cybrosys R.png b/google_search_in_odoo/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/misc/Cybrosys R.png differ diff --git a/google_search_in_odoo/static/description/assets/misc/email.svg b/google_search_in_odoo/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/phone.svg b/google_search_in_odoo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/google_search_in_odoo/static/description/assets/misc/star (1) 2.svg b/google_search_in_odoo/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/support (1) 1.svg b/google_search_in_odoo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/support-email.svg b/google_search_in_odoo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/tick-mark.svg b/google_search_in_odoo/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/whatsapp 1.svg b/google_search_in_odoo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/google_search_in_odoo/static/description/assets/misc/whatsapp.svg b/google_search_in_odoo/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/google_search_in_odoo/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..9f107e571 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..f0ae16298 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..424cb7f71 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..e12c295fa 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..f194cf136 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..917057dfa 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..b7a3f03ff 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/10.png b/google_search_in_odoo/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..aee7cc413 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/10.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/11.png b/google_search_in_odoo/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..7d41a7180 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/11.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/12.png b/google_search_in_odoo/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..0927a9b27 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/12.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/13.png b/google_search_in_odoo/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..290973114 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/13.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/2.png b/google_search_in_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..60ea8c9c6 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/2.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/3.png b/google_search_in_odoo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..458681091 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/3.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/5.png b/google_search_in_odoo/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..fa1a52c6d Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/5.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/6.png b/google_search_in_odoo/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..1824cdda3 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/6.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/7.png b/google_search_in_odoo/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..687985922 Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/7.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/8.png b/google_search_in_odoo/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..16ee0c56a Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/8.png differ diff --git a/google_search_in_odoo/static/description/assets/screenshots/9.png b/google_search_in_odoo/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..2b9d05f0a Binary files /dev/null and b/google_search_in_odoo/static/description/assets/screenshots/9.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..a3cb00339 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/banner.jpg b/google_search_in_odoo/static/description/banner.jpg new file mode 100644 index 000000000..69621354f 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..98165b73c 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..84b2db477 --- /dev/null +++ b/google_search_in_odoo/static/description/index.html @@ -0,0 +1,793 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Google Search Systray

+

+ Manage to Browse Anything in Odoo Itself +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ 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

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

+ 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.

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

+ Click on the Programmable Search Engine Control Panel for + Getting Search Engine ID and click Create your first search engine.

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

+ Click on search engine created and get the Search Engine ID

+
+
+
+
+
+
+ +
+
+

+ Enable Google Search, We can access Google Search from systray.

+
+
+
+
+
+
+ +
+
+

+ Enter the Api Credentials.

+
+
+
+
+
+
+ +
+
+

+ 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.

+
+
+
+
+
+
+
    +
  • + Available in Odoo 17.0 Community & Enterprise +
  • +
  • + Google Search Systray +
      +
    • +
    +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:17th May 2024 +
+

+ Initial Commit for Google Search Systray

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + 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..f5437196f --- /dev/null +++ b/google_search_in_odoo/static/src/js/google_search.js @@ -0,0 +1,81 @@ +/** @odoo-module **/ +import { WarningDialog } from "@web/core/errors/error_dialogs"; +import { useService } from "@web/core/utils/hooks"; +import { Component,useState } from "@odoo/owl"; +import { session } from "@web/session"; +import { registry } from "@web/core/registry"; +import { Dropdown } from "@web/core/dropdown/dropdown"; +import { _t } from "@web/core/l10n/translation"; +import { Dialog } from "@web/core/dialog/dialog"; +export class GoogleSearchWidget extends Component { + async setup() { + super.setup(...arguments); + this.orm = useService('orm'); + this.dialog = useService("dialog"); + this.events = [ + 'keydown', + ]; + this.state = useState({ + isGoogleSearchEnabled: '', + }); + this.orm.call("ir.config_parameter", "get_param", ["google_search_in_odoo.google_search"]).then((result) => { + this.state.isGoogleSearchEnabled = result; + console.log("Google search is enabled:", this.state.isGoogleSearchEnabled); + }); + }; + onKeyPress(ev) { + if (ev.key === "Enter") { + ev.preventDefault(); + this._onClick(ev); + } + } + async _onClick(ev) { + var self = this + // Get response from google based on the search value and display result on the template + var input = document.getElementById("search_text") + const resultsDiv = document.getElementById('google_result'); + if (ev.key === "Enter" && input.value.trim() !== '') { + this.orm.call('res.config.settings','google_search_config',[input.value] + ).then(function (result) { + if (result.error) { + var title = _t("Alert"); + var message = _t(result.error); + self.dialog.add(WarningDialog, { title, message }); + } else if (result === null) { + var warning = _t('Limit exceeded for Queries and Queries per day') + self.dialog.add(WarningDialog, { title, warning }); + }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'; + } + } + } +GoogleSearchWidget.components = { Dropdown }; + export const searchItem = { + Component: GoogleSearchWidget, +}; +GoogleSearchWidget.template = "google_search_in_odoo.SearchSystray" +registry.category("systray").add("GoogleSearch", searchItem, { sequence: 0 }); 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..fa96cf18d --- /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..8c2b81626 --- /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 + + + +
+
+ +
+
+
+
+
+
+
+