diff --git a/odoo_chatgpt_connector/README.rst b/odoo_chatgpt_connector/README.rst new file mode 100755 index 000000000..ac6fff8e2 --- /dev/null +++ b/odoo_chatgpt_connector/README.rst @@ -0,0 +1,45 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Odoo ChatGPT Connector +====================== +This module allow to connect Odoo to ChatGPT. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V16) Ammu , + (V17) Safa Faheem PE , + (V18) Nivedhya T +Contact: odoo@cybrosys.com + +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/odoo_chatgpt_connector/__init__.py b/odoo_chatgpt_connector/__init__.py new file mode 100644 index 000000000..4ed2c02f9 --- /dev/null +++ b/odoo_chatgpt_connector/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models diff --git a/odoo_chatgpt_connector/__manifest__.py b/odoo_chatgpt_connector/__manifest__.py new file mode 100644 index 000000000..264bbd9b9 --- /dev/null +++ b/odoo_chatgpt_connector/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Odoo ChatGPT Connector', + 'version': '18.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Connect Odoo with ChatGPT', + 'description': """Module allows the application to leverage the capabilities + of the GPT language model to generate human-like responses. """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website'], + 'data': [ + 'views/odoo_chatgpt_connector_menus.xml', + 'views/res_config_setting_views.xml', + 'views/website_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'odoo_chatgpt_connector/static/src/js/submit_request.js', + 'odoo_chatgpt_connector/static/src/css/container.css' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/odoo_chatgpt_connector/controllers/__init__.py b/odoo_chatgpt_connector/controllers/__init__.py new file mode 100644 index 000000000..ef9d94f7d --- /dev/null +++ b/odoo_chatgpt_connector/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import odoo_chatgpt_connector diff --git a/odoo_chatgpt_connector/controllers/odoo_chatgpt_connector.py b/odoo_chatgpt_connector/controllers/odoo_chatgpt_connector.py new file mode 100644 index 000000000..c6dc26050 --- /dev/null +++ b/odoo_chatgpt_connector/controllers/odoo_chatgpt_connector.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import http + + +class ChatgptConnector(http.Controller): + """ This class defines the HTTP routes and methods for ChatGPT interaction. + It provides functionality to render the ChatGPT template for user + interaction.""" + @http.route(['/chatgpt_form'], type='http', auth="public", csrf=False, + website=True) + def question_submit(self): + """Rendering the template of ChatGPT""" + return http.request.render('odoo_chatgpt_connector.connector') diff --git a/odoo_chatgpt_connector/doc/RELEASE_NOTES.md b/odoo_chatgpt_connector/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..db6969f9d --- /dev/null +++ b/odoo_chatgpt_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.06.2025 +#### Version 18.0.1.0.0 +#### ADD +- Initial commit for Odoo ChatGPT Connector diff --git a/odoo_chatgpt_connector/models/__init__.py b/odoo_chatgpt_connector/models/__init__.py new file mode 100644 index 000000000..a763a0375 --- /dev/null +++ b/odoo_chatgpt_connector/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import res_config_settings diff --git a/odoo_chatgpt_connector/models/res_config_settings.py b/odoo_chatgpt_connector/models/res_config_settings.py new file mode 100644 index 000000000..b279af98f --- /dev/null +++ b/odoo_chatgpt_connector/models/res_config_settings.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models, _ +import requests + + +def notification_response(title, notification_type, message): + """Method notification_response returns the notification data according + to each conditions while checking the connection to ChatGPT.""" + notification_data = { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': _(title), + 'type': notification_type, + 'message': message, + 'sticky': False, + } + } + return notification_data + + +class ResConfigSettings(models.TransientModel): + """This class extends the base 'res.config.settings' model to include + additional fields for configuring ChatGPT integration settings.""" + _inherit = "res.config.settings" + + api_key = fields.Char(string="API Key", help="Provide the API key here", + config_parameter="odoo_chatgpt_connector.api_key") + + def action_test_api(self): + """Method action_test_api to test the connection from Odoo to ChatGPT""" + url = "https://api.openai.com/v1/chat/completions" + payload = { + 'model': 'gpt-3.5-turbo', + 'messages': [ + {"role": "user", "content": ""} + ] + } + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'odoo_chatgpt_connector.api_key') + if not api_key: + notification = notification_response( + title="No API key!", + notification_type="danger", + message="Please provide an API Key" + ) + return notification + + headers = { + 'Authorization': f"Bearer {api_key}", + 'Content-Type': "application/json" + } + try: + response = requests.post(url, headers=headers, json=payload, timeout=10) + response.raise_for_status() # Raise error for bad HTTP status + notification = notification_response( + title="Connection Successful!", + notification_type="success", + message="Successfully connected to ChatGPT" + ) + return notification + + except requests.exceptions.Timeout: + return notification_response( + title="Connection Timeout!", + notification_type="danger", + message="The request to ChatGPT timed out" + ) + + except requests.exceptions.RequestException as e: + return notification_response( + title="Connection Error!", + notification_type="danger", + message="Error connecting to ChatGPT: API Key may be invalid" + ) + diff --git a/odoo_chatgpt_connector/static/description/assets/cybro-icon.png b/odoo_chatgpt_connector/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/cybro-icon.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/cybro-odoo.png b/odoo_chatgpt_connector/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/cybro-odoo.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/h2.png b/odoo_chatgpt_connector/static/description/assets/h2.png new file mode 100755 index 000000000..0bfc4707d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/h2.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/arrows-repeat.svg b/odoo_chatgpt_connector/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-1.png b/odoo_chatgpt_connector/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/banner-1.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-2.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.png b/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-call.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-mail.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-pattern.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/banner-promo.svg b/odoo_chatgpt_connector/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/brand-pair.svg b/odoo_chatgpt_connector/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/check.png b/odoo_chatgpt_connector/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/check.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/chevron.png b/odoo_chatgpt_connector/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/chevron.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/close-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/cogs.png b/odoo_chatgpt_connector/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/cogs.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/collabarate-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/consultation.png b/odoo_chatgpt_connector/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/consultation.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/cybro-logo.png b/odoo_chatgpt_connector/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/cybro-logo.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/down.svg b/odoo_chatgpt_connector/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/odoo_chatgpt_connector/static/description/assets/icons/ecom-black.png b/odoo_chatgpt_connector/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/education-black.png b/odoo_chatgpt_connector/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/education-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/faq.png b/odoo_chatgpt_connector/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/faq.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/feature-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/feature.png b/odoo_chatgpt_connector/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/feature.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/gear.svg b/odoo_chatgpt_connector/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/hero.gif b/odoo_chatgpt_connector/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..d28160470 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/hero.gif differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/hire-odoo.svg b/odoo_chatgpt_connector/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/hotel-black.png b/odoo_chatgpt_connector/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/license.png b/odoo_chatgpt_connector/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/license.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/life-ring-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/lifebuoy.png b/odoo_chatgpt_connector/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/mail.svg b/odoo_chatgpt_connector/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/manufacturing-black.png b/odoo_chatgpt_connector/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/notes.png b/odoo_chatgpt_connector/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/notes.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/notification icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/odoo-consultancy.svg b/odoo_chatgpt_connector/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/odoo-licencing.svg b/odoo_chatgpt_connector/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/odoo-logo.png b/odoo_chatgpt_connector/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/odoo-logo.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/patter.svg b/odoo_chatgpt_connector/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/pattern1.png b/odoo_chatgpt_connector/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/pattern1.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/pos-black.png b/odoo_chatgpt_connector/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/pos-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/puzzle-piece-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/puzzle.png b/odoo_chatgpt_connector/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/puzzle.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/replace-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/restaurant-black.png b/odoo_chatgpt_connector/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/screenshot-main.png b/odoo_chatgpt_connector/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/screenshot-main.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/screenshot.png b/odoo_chatgpt_connector/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/screenshot.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/service-black.png b/odoo_chatgpt_connector/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/service-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/skype-fill.svg b/odoo_chatgpt_connector/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/skype.png b/odoo_chatgpt_connector/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/skype.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/skype.svg b/odoo_chatgpt_connector/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/star-1.svg b/odoo_chatgpt_connector/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/star-2.svg b/odoo_chatgpt_connector/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/support.png b/odoo_chatgpt_connector/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/support.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/test-1 - Copy.png b/odoo_chatgpt_connector/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/test-1 - Copy.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/test-1.png b/odoo_chatgpt_connector/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/test-1.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/test-2.png b/odoo_chatgpt_connector/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/test-2.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/trading-black.png b/odoo_chatgpt_connector/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/trading-black.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/training.png b/odoo_chatgpt_connector/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/training.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/translate.svg b/odoo_chatgpt_connector/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/update.png b/odoo_chatgpt_connector/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/update.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/user.png b/odoo_chatgpt_connector/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/user.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/video.png b/odoo_chatgpt_connector/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/video.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/whatsapp.png b/odoo_chatgpt_connector/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/whatsapp.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/icons/wrench-icon.svg b/odoo_chatgpt_connector/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/odoo_chatgpt_connector/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatgpt_connector/static/description/assets/icons/wrench.png b/odoo_chatgpt_connector/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/icons/wrench.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b1.png b/odoo_chatgpt_connector/static/description/assets/modules/b1.png new file mode 100644 index 000000000..6e617f3d3 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b1.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b2.png b/odoo_chatgpt_connector/static/description/assets/modules/b2.png new file mode 100644 index 000000000..696582fa8 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b2.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b3.png b/odoo_chatgpt_connector/static/description/assets/modules/b3.png new file mode 100644 index 000000000..cf81c09f8 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b3.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b4.png b/odoo_chatgpt_connector/static/description/assets/modules/b4.png new file mode 100644 index 000000000..206e14c47 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b4.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b5.png b/odoo_chatgpt_connector/static/description/assets/modules/b5.png new file mode 100644 index 000000000..1b0ce4674 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b5.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/modules/b6.png b/odoo_chatgpt_connector/static/description/assets/modules/b6.png new file mode 100644 index 000000000..0249a98f1 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/modules/b6.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot0.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot0.png new file mode 100644 index 000000000..530b483ae Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot0.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot1.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..3e7335924 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot1.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot2.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..d0cf84174 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot2.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot3.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..d4b473228 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot3.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot4.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..40eef9c3b Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot4.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot5.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..6398323f0 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot5.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot6.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..2336c610b Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot6.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot7.png b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot7.png new file mode 100644 index 000000000..ae8a6b2fe Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/screenshots/screenshot7.png differ diff --git a/odoo_chatgpt_connector/static/description/assets/y18.jpg b/odoo_chatgpt_connector/static/description/assets/y18.jpg new file mode 100755 index 000000000..eea1714f2 Binary files /dev/null and b/odoo_chatgpt_connector/static/description/assets/y18.jpg differ diff --git a/odoo_chatgpt_connector/static/description/banner.jpg b/odoo_chatgpt_connector/static/description/banner.jpg new file mode 100644 index 000000000..d90c87fdc Binary files /dev/null and b/odoo_chatgpt_connector/static/description/banner.jpg differ diff --git a/odoo_chatgpt_connector/static/description/icon.png b/odoo_chatgpt_connector/static/description/icon.png new file mode 100644 index 000000000..37e2a529d Binary files /dev/null and b/odoo_chatgpt_connector/static/description/icon.png differ diff --git a/odoo_chatgpt_connector/static/description/index.html b/odoo_chatgpt_connector/static/description/index.html new file mode 100644 index 000000000..ae576829e --- /dev/null +++ b/odoo_chatgpt_connector/static/description/index.html @@ -0,0 +1,1121 @@ + + + + + + Odoo ChatGPT Connector + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Allows to leverage the capabilities of the GPT language model to generate human-like responses, providing a more natural and intuitive user experience. +

+

Odoo ChatGPT Connector +

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

Key + Highlights

+
+
+
+
+ +
+
+ Easy to set up. +
+

+

+
+
+
+
+
+ +
+
+ Answer of the query. +
+

+ +

+
+
+
+
+
+ +
+
+ Copy to clipboard. +
+

+ +

+
+
+
+
+ +
+
+
+ Odoo ChatGPT Connector +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Navigate to the + + API section. +

+
+
+

+ If you don't already have an OpenAI account, create an OpenAI account and login your account. https://openai.com/ +

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

+ Create new + + secret key. +

+
+
+

+ You can see a button "Create new secret key". Click on that button to generate a new API key. +

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

+ OpenAI charges for use of its + + API. +

+
+
+

+ OpenAI charges for use of its API on a usage basis, so, if you haven't already set up a payment method for billing, you'll need to do so. Otherwise, the API Key you just created won't work. +

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

+ Set the API inside the settings of + + + Website. +

+
+
+

+ You can simply set the API inside the settings of Website. +

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

+ ChatGPT + + + Menu. +

+
+
+

+ You can see the ChatGPT Menu.Click on the button for redirect to the form. +

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

+ Enter your question and click the + + + Generate Response button. +

+
+
+

+ Enter your question and click the Generate Response button for getting the Answer.You can see the Answer is 'Loading'. +

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

+ Answer of the Entered question + + + question. +

+
+
+

+ +

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

+ Copy button for copying the answer into + + + clipboard +

+
+
+

+

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

+ Easy to set up API of the ChatGPT.

+
+ +
+
+
+
+
+
+ +
+

+ You can get the answer of the query below.

+
+ +
+
+
+
+
+
+ +
+

+ Also, possible to copy the Answer into clipboard by simply click on the copy button.

+
+ +
+
+
+
+
+
+ +
+

+ You can simply type your question into the form interface and search it.As like ChatGPT, module is able to respond to a wide variety of questions and prompts.

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

+ The Odoo ChatGPT Connector is + an integration between Odoo + and OpenAI’s GPT language model. + It enables the application to + generate human-like responses in chats, + providing enhanced customer support, + automated replies, and intelligent + conversation capabilities within Odoo. + +

+
+
+ +
+ +
+

+ Yes, you will need an API key + from OpenAI to connect Odoo with + the ChatGPT model. This key allows + Odoo to send requests to OpenAI’s + servers and receive responses. +

+
+
+ +
+ +
+

+ The connector leverages the GPT + language model to generate responses + based on the user's queries in Odoo chat + interfaces. It processes the input and + returns contextually relevant responses + in real time, improving communication + efficiency and user engagement. +

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

+ Latest Release 18.0.1.0.0 +

+ + 04th June, 2025 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/odoo_chatgpt_connector/static/src/css/container.css b/odoo_chatgpt_connector/static/src/css/container.css new file mode 100644 index 000000000..61b4d3935 --- /dev/null +++ b/odoo_chatgpt_connector/static/src/css/container.css @@ -0,0 +1,325 @@ + +#result_area{ + overflow:auto; + width:1023px !important; + font-size:14px; + height: 300px !important; + margin:0px ; + display:block; + border-radius:10px; + margin-bottom: 40px !important; + +} +background:#eee; +} + +.padding { + padding: 50px; +} + +/* GRID */ +.col-md-9{ +width: 106%; +padding: 129px; +} +.col { + padding: 10px 20px; + margin-bottom: 10px; + background: #fff; + color: #666666; + text-align: center; + font-weight: 400; + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1); +} + +.row h3 { + color: #666666; +} + +.row.grid { + margin-left: 0; +} + +.grid { + position: relative; + width: 100%; + background: #fff; + color: #666666; + border-radius: 2px; + margin-bottom: 25px; + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1); +} + +.grid .grid-header { + position: relative; + border-bottom: 1px solid #ddd; + padding: 15px 10px 10px 20px; +} + +.grid .grid-header:before, +.grid .grid-header:after { + display: table; + content: " "; +} + +.grid .grid-header:after { + clear: both; +} + +.grid .grid-header span, +.grid .grid-header > .fa { + display: inline-block; + margin: 0; + font-weight: 300; + font-size: 1.5em; + float: left; +} + +.grid .grid-header span { + padding: 0 5px; +} + +.grid .grid-header > .fa { + padding: 5px 10px 0 0; +} + +.grid .grid-header > .grid-tools { + padding: 4px 10px; +} + +.grid .grid-header > .grid-tools a { + color: #999999; + padding-left: 10px; + cursor: pointer; +} + +.grid .grid-header > .grid-tools a:hover { + color: #666666; +} + +.grid .grid-body { + padding: 15px 20px 15px 20px; + font-size: 0.9em; + line-height: 1.9em; +} + +.grid .full { + padding: 0 !important; +} + +.grid .transparent { + box-shadow: none !important; + margin: 0px !important; + border-radius: 0px !important; +} + +.grid.top.black > .grid-header { + border-top-color: #000000 !important; +} + +.grid.bottom.black > .grid-body { + border-bottom-color: #000000 !important; +} + +.grid.top.blue > .grid-header { + border-top-color: #007be9 !important; +} + +.grid.bottom.blue > .grid-body { + border-bottom-color: #007be9 !important; +} + +.grid.top.green > .grid-header { + border-top-color: #00c273 !important; +} + +.grid.bottom.green > .grid-body { + border-bottom-color: #00c273 !important; +} + +.grid.top.purple > .grid-header { + border-top-color: #a700d3 !important; +} + +.grid.bottom.purple > .grid-body { + border-bottom-color: #a700d3 !important; +} + +.grid.top.red > .grid-header { + border-top-color: #dc1200 !important; +} + +.grid.bottom.red > .grid-body { + border-bottom-color: #dc1200 !important; +} + +.grid.top.orange > .grid-header { + border-top-color: #f46100 !important; +} + +.grid.bottom.orange > .grid-body { + border-bottom-color: #f46100 !important; +} + +.grid.no-border > .grid-header { + border-bottom: 0px !important; +} + +.grid.top > .grid-header { + border-top-width: 4px !important; + border-top-style: solid !important; +} + +.grid.bottom > .grid-body { + border-bottom-width: 4px !important; + border-bottom-style: solid !important; +} + + +/* SUPPORT TICKET */ +.support ul { + list-style: none; + padding: 0px; +} + +.support ul li { + padding: 8px 10px; +} + +.support ul li a { + color: #999; + display: block; +} + +.support ul li a:hover { + color: #666; +} + +.support ul li.active { + background: #0073b7; +} + +.support ul li.active a { + color: #fff; +} + +.support ul.support-label li { + padding: 2px 0px; +} + +.support h2, +.support-content h2 { + margin-top: 5px; +} + +.support-content .list-group li { + padding: 15px 20px 12px 20px; + cursor: pointer; +} + +.support-content .list-group li:hover { + background: #eee; +} + +.support-content .fa-padding .fa { + padding-top: 5px; + width: 1.5em; +} + +.support-content .info { + color: #777; + margin: 0px; +} + +.support-content a { + color: #111; +} + +.support-content .info a:hover { + text-decoration: underline; +} + +.support-content .info .fa { + width: 1.5em; + text-align: center; +} + +.support-content .number { + color: #777; +} + +.support-content img { + margin: 0 auto; + display: block; +} + +.support-content .modal-body { + padding-bottom: 0px; +} + +.support-content-comment { + padding: 10px 10px 10px 30px; + background: #eee; + border-top: 1px solid #ccc; +} + + +/* BACKGROUND COLORS */ +.bg-red, .bg-yellow, .bg-aqua, .bg-blue, .bg-light-blue, .bg-green, .bg-navy, .bg-teal, .bg-olive, .bg-lime, .bg-orange, .bg-fuchsia, .bg-purple, .bg-maroon, bg-gray, bg-black, .bg-red a, .bg-yellow a, .bg-aqua a, .bg-blue a, .bg-light-blue a, .bg-green a, .bg-navy a, .bg-teal a, .bg-olive a, .bg-lime a, .bg-orange a, .bg-fuchsia a, .bg-purple a, .bg-maroon a, bg-gray a, .bg-black a { + color: #f9f9f9 !important; +} +.bg-white, .bg-white a { + color: #999999 !important; +} +.bg-red { + background-color: #f56954 !important; +} +.bg-yellow { + background-color: #f39c12 !important; +} +.bg-aqua { + background-color: #00c0ef !important; +} +.bg-blue { + background-color: #0073b7 !important; +} +.bg-light-blue { + background-color: #3c8dbc !important; +} +.bg-green { + background-color: #00a65a !important; +} +.bg-navy { + background-color: #001f3f !important; +} +.bg-teal { + background-color: #39cccc !important; +} +.bg-olive { + background-color: #3d9970 !important; +} +.bg-lime { + background-color: #01ff70 !important; +} +.bg-orange { + background-color: #ff851b !important; +} +.bg-fuchsia { + background-color: #f012be !important; +} +.bg-purple { + background-color: #932ab6 !important; +} +.bg-maroon { + background-color: #85144b !important; +} +.bg-gray { + background-color: #eaeaec !important; +} +.bg-black { + background-color: #222222 !important; +} +.btn-default{ + left: 1600%; + border: #8e7d6c; +} \ No newline at end of file diff --git a/odoo_chatgpt_connector/static/src/js/submit_request.js b/odoo_chatgpt_connector/static/src/js/submit_request.js new file mode 100644 index 000000000..c0e40f571 --- /dev/null +++ b/odoo_chatgpt_connector/static/src/js/submit_request.js @@ -0,0 +1,85 @@ +/** @odoo-module **/ +import publicWidget from '@web/legacy/js/public/public_widget'; +import { _t } from "@web/core/l10n/translation"; +publicWidget.registry.QuestionInput = publicWidget.Widget.extend({ + selector: "#main_layout", + events: { + 'click #send_button': 'get_answer', + 'click #copy_content': 'copy', + }, + /** + * @constructor + */ + init: function() { + this._super(...arguments); + this.orm = this.bindService("orm"); + this.notification = this.bindService("notification"); + this.api_key = ""; + }, + /* For getting the Answer of submitted question */ + get_answer: async function(event) { + $(event.currentTarget).prop("disabled", true); + $('#result_area').val(''); + $('#result_area')[0].placeholder = "Loading....."; + if (!this.api_key) { + await this.orm.call( + "ir.config_parameter", "get_param", ["odoo_chatgpt_connector.api_key"] + ).then(result => { + this.api_key = result; + }); + } + var question = $('#question_input').val(); + if (!question) { + $('#result_area')[0].placeholder = "Please drop your question"; + this.notification.add( + _t("Please drop your question"), + { type: 'danger', sticky: false }, + ) + $(event.currentTarget).prop("disabled", false); + return; + } + var myHeaders = new Headers(); + myHeaders.append("Content-Type", "application/json"); + myHeaders.append("Authorization", "Bearer " + this.api_key); + var raw = JSON.stringify({ + "model": "gpt-3.5-turbo-instruct", + "prompt": question, + "temperature": 0, + "max_tokens": 1000, + "top_p": 1, + "frequency_penalty": 0, + "presence_penalty": 0, + }); + var requestOptions = { + method: 'POST', + headers: myHeaders, + body: raw, + redirect: 'follow' + }; + fetch("https://api.openai.com/v1/completions", requestOptions) + .then(response => response.json()) + .then(result => { + let area = result.choices[0].text; + $('#result_area').val(area.trim()); + $(event.currentTarget).prop("disabled", false); + }) + .catch(error => { + $('#result_area')[0].placeholder = "Couldn't fetch"; + this.notification.add( + _t("Couldn't connect to OpenAI server please check your Credentials"), + { type: 'danger', sticky: false }, + ) + $(event.currentTarget).prop("disabled", false); + }); + }, + /* For copying the Answer to the clipboard */ + copy: function(event) { + var textToCopy = $("#result_area").val(); + var tempTextarea = $('