diff --git a/openai_product_tag_description/README.rst b/openai_product_tag_description/README.rst new file mode 100644 index 000000000..c76026709 --- /dev/null +++ b/openai_product_tag_description/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Generate Product Description / Tags Using OpenAI +============================================== +* Module which helps create product tag from description and description from tags + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (v15) Mohammed Dilshad TK, 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/openai_product_tag_description/__init__.py b/openai_product_tag_description/__init__.py new file mode 100644 index 000000000..ac46998aa --- /dev/null +++ b/openai_product_tag_description/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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 models diff --git a/openai_product_tag_description/__manifest__.py b/openai_product_tag_description/__manifest__.py new file mode 100644 index 000000000..a10b17f5a --- /dev/null +++ b/openai_product_tag_description/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding:utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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': 'Generate Product Description / Tags Using OpenAI', + 'version': '15.0.1.0.0', + 'category': 'Productivity', + 'summary': 'Creates product tag and description Using AI', + 'description': 'Generate Product Description/Tags Using OpenAI module helps ' + 'to Automatically generate Product Tag and Description ' + 'using OpenAI API', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['product', 'openai_odoo_base', 'stock'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_tag_views.xml', + 'views/product_product_views.xml', + 'views/product_template_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/openai_product_tag_description/doc/RELEASE_NOTES.md b/openai_product_tag_description/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..56725c43c --- /dev/null +++ b/openai_product_tag_description/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 19.09.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Generate Product Description / Tags Using OpenAI diff --git a/openai_product_tag_description/models/__init__.py b/openai_product_tag_description/models/__init__.py new file mode 100644 index 000000000..bf2e065c6 --- /dev/null +++ b/openai_product_tag_description/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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 product_product +from . import product_tag +from . import product_template diff --git a/openai_product_tag_description/models/product_product.py b/openai_product_tag_description/models/product_product.py new file mode 100644 index 000000000..b345412c8 --- /dev/null +++ b/openai_product_tag_description/models/product_product.py @@ -0,0 +1,166 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +import requests +from odoo import fields, models, _ +from odoo.exceptions import ValidationError + + +class ProductProduct(models.Model): + """ Inherit product model to add tag field and function create tag + and description""" + _inherit = 'product.product' + + product_tag_ids = fields.Many2many('product.tag', + related='product_tmpl_id.product_tag_ids', + string="Product Tags", readonly=False, + help="Tags for the product") + + def action_create_tag_internal_note(self): + """Summary: + Function to create tags from Internal notes + """ + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'openai_api_key') + if not api_key: + raise ValidationError( + _("Provide an API key in the settings")) + product = self.env['product.product'].browse(self._context['active_id']) + tags_list = [] + if product.description: + prompt = "Generate tags for the following description: \n" + str( + product.description) + "\n\nTags:" + try: + response = requests.post( + "https://api.openai.com/v1/engines/text-davinci-002" + "/completions", + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + }, + json={ + "prompt": prompt, + "max_tokens": 60, + "n": 1, + "stop": None, + "temperature": 0.5 + }) + except Exception: + raise ValidationError( + _("Connection Failed")) + if str(response) == '': + raise ValidationError(_("Access denied. Please ensure you " + "have valid credentials and try again.")) + elif str(response) == '' and not \ + response.json()['error']['message'] == ('You exceeded your ' + 'current quota, ' + 'please check ' + 'your plan and ' + 'billing details.'): + raise ValidationError( + _("Sorry, Openai currently experiencing high traffic. " + "Please wait a moment and try again.")) + elif str(response) == '' and \ + response.json()['error'][ + 'message'] == ('You exceeded your current quota, ' + 'please check your plan and billing ' + 'details.'): + raise ValidationError(_("'You exceeded your current quota, " + "please check your plan and billing details.'")) + else: + tags = response.json()["choices"][0]["text"].split(",") + tags = [tag.strip() for tag in tags] + tags_list.extend(tags) + tags_exists = self.env['product.tag'].search([]).mapped('name') + for tag in tags_list: + if tag not in tags_exists: + tag_created = self.env['product.tag'].create({ + 'name': tag}) + product.write({ + 'product_tag_ids': [(4, tag_created.id)] + }) + else: + tags_exist = self.env['product.tag'].search( + [('name', '=', tag)]) + for tag_apply in tags_exist: + product.write({ + 'product_tag_ids': [(4, tag_apply.id)] + }) + else: + raise ValidationError( _("No description for this product")) + + def generate_internal_notes_from_tags(self): + """Summary: + Function to create Internal notes from tags + """ + prompt = "Generate a description for a product based on " \ + "the following tags: \n" + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'openai_api_key') + product_id = self._context['active_id'] + product = self.env['product.product'].browse(product_id) + if product.product_tag_ids: + for tag in product.product_tag_ids: + prompt += f"- {tag}\n" + prompt += "\nDescription:" + try: + response = requests.post( + "https://api.openai.com/v1/engines/text-davinci-002" + "/completions", + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + }, + json={ + "prompt": prompt, + "max_tokens": 200, + "n": 1, + "stop": None, + "temperature": 0.5 + } + ) + except Exception: + raise ValidationError(_("Connection Failed")) + if str(response) == '': + raise ValidationError( + _("Access denied. Please ensure you have valid " + "credentials and try again.")) + elif str(response) == '' and not \ + response.json()['error']['message'] == ('You exceeded your ' + 'current quota, ' + 'please check ' + 'your plan and ' + 'billing details.'): + raise ValidationError( + _("Sorry, Openai currently experiencing high traffic. " + "Please wait a moment and try again.")) + elif str(response) == '' and \ + response.json()['error'][ + 'message'] == ('You exceeded your current quota, ' + 'please check your plan and billing ' + 'details.'): + raise ValidationError(_("'You exceeded your current quota, " + "please check your plan and billing details.'")) + else: + description = response.json()["choices"][0]["text"].split('\n') + product.description = description[-1] + else: + raise ValidationError(_("No tags for this product")) diff --git a/openai_product_tag_description/models/product_tag.py b/openai_product_tag_description/models/product_tag.py new file mode 100644 index 000000000..33e42aa57 --- /dev/null +++ b/openai_product_tag_description/models/product_tag.py @@ -0,0 +1,40 @@ +# -*- coding:utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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 random import randint +from odoo import fields, models + + +class ProductTag(models.Model): + """Create a model to assign tags for products""" + _name = 'product.tag' + _description = 'Product Tag' + + def add_random_color(self): + """Summary: + Function to set default colour for tags + """ + return randint(1, 11) + + name = fields.Char(required=1, copy=False, string='Name', + help='Name of tag') + tag_color = fields.Integer(string="Tag Color", default=add_random_color, + help='Colour of tag') diff --git a/openai_product_tag_description/models/product_template.py b/openai_product_tag_description/models/product_template.py new file mode 100644 index 000000000..a3b4a8457 --- /dev/null +++ b/openai_product_tag_description/models/product_template.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# 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 . +# +################################################################################ +import requests +from odoo import fields, models, _ +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + """Inherit product template to add field of product tags and functions to + create description and tags.""" + _inherit = 'product.template' + + product_tag_ids = fields.Many2many('product.tag', string="Product Tags", + help="Tags For Product") + + def action_create_tag_description(self): + """Summary: + Function to create tags from description + """ + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'openai_api_key') + if not api_key: + raise ValidationError(_("Provide an API key in the settings")) + product = self.env['product.template'].browse(self._context['active_id']) + tags_list = [] + if product.description: + prompt = "Generate tags for the following description: \n" + str( + product.description) + "\n\nTags:" + try: + response = requests.post \ + ("https://api.openai.com/v1/engines/text-davinci-002" + "/completions", + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + }, + json={ + "prompt": prompt, + "max_tokens": 60, + "n": 1, + "stop": None, + "temperature": 0.5 + }) + except Exception: + raise ValidationError( + _("Connection Failed")) + if str(response) == '': + raise ValidationError( + _("Access denied. Please ensure you have valid " + "credentials and try again.")) + elif str(response) == '' and not \ + response.json()['error']['message'] == ('You exceeded your ' + 'current quota, please check your plan and ' + 'billing details.'): + raise ValidationError( + _("Sorry, Openai currently experiencing high traffic. " + "Please wait a moment and try again.")) + elif str(response) == '' and \ + response.json()['error'][ + 'message'] == ('You exceeded your current quota, ' + 'please check your plan and billing ' + 'details.'): + raise ValidationError(_("'You exceeded your current quota, " + "please check your plan and billing details.'")) + else: + tags = response.json()["choices"][0]["text"].split(",") + tags = [tag.strip() for tag in tags] + tags_list.extend(tags) + tags_exists = self.env['product.tag'].search([]).mapped('name') + for tag in tags_list: + if tag not in tags_exists: + tag_created = self.env['product.tag'].create({ + 'name': tag}) + product.write({ + 'product_tag_ids': [(4, tag_created.id)] + }) + else: + tags_exist = self.env['product.tag'].search( + [('name', '=', tag)]) + for tag_apply in tags_exist: + product.write({ + 'product_tag_ids': [(4, tag_apply.id)] + }) + else: + raise ValidationError(_("No description for this product")) + + def generate_description_from_tags(self): + """Summary: + Function to create description from tags + """ + prompt = "Generate a description for a product based on" \ + " the following tags: \n" + api_key = self.env['ir.config_parameter'].sudo().get_param( + 'openai_api_key') + if not api_key: + raise ValidationError(_("Provide an API key in the settings")) + product = self.env['product.template'].browse(self._context['active_id']) + if product.product_tag_ids: + for tag in product.product_tag_ids: + prompt += f"- {tag}\n" + prompt += "\nDescription:" + try: + response = requests.post( + "https://api.openai.com/v1/engines/text-davinci-002" + "/completions", + headers={ + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + }, + json={ + "prompt": prompt, + "max_tokens": 200, + "n": 1, + "stop": None, + "temperature": 0.5 + }) + except Exception: + raise ValidationError(_("Connection Failed")) + if str(response) == '': + raise ValidationError(_("Access denied. Please ensure you " + "have valid credentials and try again.")) + elif str(response) == '' and not \ + response.json()['error']['message'] == ('You exceeded your ' + 'current quota, please check your plan and billing ' + 'details.'): + raise ValidationError(_("Sorry, Openai currently experiencing " + "high traffic. Please wait a moment and try again.")) + elif str(response) == '' and \ + response.json()['error'][ + 'message'] == ('You exceeded your current quota, ' + 'please check your plan and billing ' + 'details.'): + raise ValidationError(_("'You exceeded your current quota, " + "please check your plan and billing details.'")) + else: + description = response.json()["choices"][0]["text"].split('\n') + product.description = description[-1] + else: + raise ValidationError(_("No tags for this product")) diff --git a/openai_product_tag_description/security/ir.model.access.csv b/openai_product_tag_description/security/ir.model.access.csv new file mode 100644 index 000000000..71ac846f6 --- /dev/null +++ b/openai_product_tag_description/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_tag_user,access.product.tag.user,model_product_tag,base.group_user,1,1,1,1 diff --git a/openai_product_tag_description/static/description/assets/icons/check.png b/openai_product_tag_description/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/check.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/chevron.png b/openai_product_tag_description/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/chevron.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/cogs.png b/openai_product_tag_description/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/cogs.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/consultation.png b/openai_product_tag_description/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/consultation.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/ecom-black.png b/openai_product_tag_description/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/ecom-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/education-black.png b/openai_product_tag_description/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/education-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/hotel-black.png b/openai_product_tag_description/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/hotel-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/license.png b/openai_product_tag_description/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/license.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/lifebuoy.png b/openai_product_tag_description/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/lifebuoy.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/manufacturing-black.png b/openai_product_tag_description/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/manufacturing-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/pos-black.png b/openai_product_tag_description/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/pos-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/puzzle.png b/openai_product_tag_description/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/puzzle.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/restaurant-black.png b/openai_product_tag_description/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/restaurant-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/service-black.png b/openai_product_tag_description/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/service-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/trading-black.png b/openai_product_tag_description/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/trading-black.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/training.png b/openai_product_tag_description/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/training.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/update.png b/openai_product_tag_description/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/update.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/user.png b/openai_product_tag_description/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/user.png differ diff --git a/openai_product_tag_description/static/description/assets/icons/wrench.png b/openai_product_tag_description/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/openai_product_tag_description/static/description/assets/icons/wrench.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/categories.png b/openai_product_tag_description/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/categories.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/check-box.png b/openai_product_tag_description/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/check-box.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/compass.png b/openai_product_tag_description/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/compass.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/corporate.png b/openai_product_tag_description/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/corporate.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/customer-support.png b/openai_product_tag_description/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/customer-support.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/cybrosys-logo.png b/openai_product_tag_description/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/cybrosys-logo.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/features.png b/openai_product_tag_description/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/features.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/logo.png b/openai_product_tag_description/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/logo.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/pictures.png b/openai_product_tag_description/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/pictures.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/pie-chart.png b/openai_product_tag_description/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/pie-chart.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/right-arrow.png b/openai_product_tag_description/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/right-arrow.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/star.png b/openai_product_tag_description/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/star.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/support.png b/openai_product_tag_description/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/support.png differ diff --git a/openai_product_tag_description/static/description/assets/misc/whatsapp.png b/openai_product_tag_description/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/misc/whatsapp.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/agriculture_management_odoo.png b/openai_product_tag_description/static/description/assets/modules/agriculture_management_odoo.png new file mode 100644 index 000000000..3dc1faa62 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/agriculture_management_odoo.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/ent_hr_zk_attendance.png b/openai_product_tag_description/static/description/assets/modules/ent_hr_zk_attendance.png new file mode 100644 index 000000000..e43203b55 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/ent_hr_zk_attendance.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/openai_odoo_base.png b/openai_product_tag_description/static/description/assets/modules/openai_odoo_base.png new file mode 100644 index 000000000..826cf844a Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/openai_odoo_base.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/openai_product_images.png b/openai_product_tag_description/static/description/assets/modules/openai_product_images.png new file mode 100644 index 000000000..29ca152cb Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/openai_product_images.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/project_dashboard_odoo.png b/openai_product_tag_description/static/description/assets/modules/project_dashboard_odoo.png new file mode 100644 index 000000000..922179d26 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/project_dashboard_odoo.png differ diff --git a/openai_product_tag_description/static/description/assets/modules/systray_world_clock.jpg b/openai_product_tag_description/static/description/assets/modules/systray_world_clock.jpg new file mode 100644 index 000000000..960808f42 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/modules/systray_world_clock.jpg differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/1_img.png b/openai_product_tag_description/static/description/assets/screenshots/1_img.png new file mode 100644 index 000000000..a3d57abdd Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/1_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/2_img.png b/openai_product_tag_description/static/description/assets/screenshots/2_img.png new file mode 100644 index 000000000..99ce3ac9e Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/2_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/3_img.png b/openai_product_tag_description/static/description/assets/screenshots/3_img.png new file mode 100644 index 000000000..4998a1fff Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/3_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/4_img.png b/openai_product_tag_description/static/description/assets/screenshots/4_img.png new file mode 100644 index 000000000..c6ae80398 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/4_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/5_img.png b/openai_product_tag_description/static/description/assets/screenshots/5_img.png new file mode 100644 index 000000000..1d60d11b6 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/5_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/6_img.png b/openai_product_tag_description/static/description/assets/screenshots/6_img.png new file mode 100644 index 000000000..02542cf0f Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/6_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/7_img.png b/openai_product_tag_description/static/description/assets/screenshots/7_img.png new file mode 100644 index 000000000..c43eacfa1 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/7_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/8_img.png b/openai_product_tag_description/static/description/assets/screenshots/8_img.png new file mode 100644 index 000000000..ea0f35f8e Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/8_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/9_img.png b/openai_product_tag_description/static/description/assets/screenshots/9_img.png new file mode 100644 index 000000000..c2cdfbb15 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/9_img.png differ diff --git a/openai_product_tag_description/static/description/assets/screenshots/hero.gif b/openai_product_tag_description/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e45bb9622 Binary files /dev/null and b/openai_product_tag_description/static/description/assets/screenshots/hero.gif differ diff --git a/openai_product_tag_description/static/description/banner.png b/openai_product_tag_description/static/description/banner.png new file mode 100644 index 000000000..7a8fee1ab Binary files /dev/null and b/openai_product_tag_description/static/description/banner.png differ diff --git a/openai_product_tag_description/static/description/icon.png b/openai_product_tag_description/static/description/icon.png new file mode 100644 index 000000000..e727b70f6 Binary files /dev/null and b/openai_product_tag_description/static/description/icon.png differ diff --git a/openai_product_tag_description/static/description/index.html b/openai_product_tag_description/static/description/index.html new file mode 100644 index 000000000..9459bf110 --- /dev/null +++ b/openai_product_tag_description/static/description/index.html @@ -0,0 +1,645 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Generate Product Description / Tags Using OpenAI

+

+ Automate Product Tag And Description Generation In Odoo + Using OpenAI API

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module offers a convenient and efficient solution to automate the + process of creating product tags and + generating descriptions based on them. This module utilizes the power of + the OpenAI API(Paid Key) to analyze product + descriptions and generate relevant tags, as well as generate + descriptions based on assigned tags. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Available in Odoo 15.0 + Community and Enterprise. +
+
+ + Automate Product Description Generation in Odoo +
+
+
+
+ + Automate Product Tag Generation in Odoo +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+
+
+

Field to Fill API Key

+

Fill your Paid API Key in settings for easy accessibility of api + key.

+ +
+
+
+

+ Description Creation +

+

+ Description creation on product menu on the basis of tags

+ +

+ +

+
+
+
+
+

+ Tag Creation +

+

+ Tag creation on product menu on the basis of description

+ +

+ +

+
+
+
+
+

+ Description Creation +

+

+ Description creation on product variant menu on the basis of tags

+ +

+ +

+
+
+
+
+

+ Tag Creation +

+

+ Tag creation on product variant menu on the basis of description

+ +

+ +

+
+
+ + +
+
+ +
+

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

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/openai_product_tag_description/views/product_product_views.xml b/openai_product_tag_description/views/product_product_views.xml new file mode 100644 index 000000000..8d177ed6e --- /dev/null +++ b/openai_product_tag_description/views/product_product_views.xml @@ -0,0 +1,38 @@ + + + + + + product.product.view.form.inherit.openai.product.tag.description + + product.product + + + + + + + + + + Generate Tags from Internal Note Using Openai + + + list,form + code + action = model.action_create_tag_internal_note() + + + + + Generate Internal Note Using Openai + + + list,form + code + action = model.generate_internal_notes_from_tags() + + + diff --git a/openai_product_tag_description/views/product_tag_views.xml b/openai_product_tag_description/views/product_tag_views.xml new file mode 100644 index 000000000..20510387c --- /dev/null +++ b/openai_product_tag_description/views/product_tag_views.xml @@ -0,0 +1,53 @@ + + + + + product.tag.action + ir.actions.act_window + product.tag + tree,form,kanban + +

Create New Product Tag!

+
+
+ + + product.tag.view.tree + product.tag + tree + + + + + + + + + + product.tag.view.form + product.tag + +
+ +
+

+ +

+
+ + + + + + + + +
+
+
+
+ + +
diff --git a/openai_product_tag_description/views/product_template_views.xml b/openai_product_tag_description/views/product_template_views.xml new file mode 100644 index 000000000..edb8efa17 --- /dev/null +++ b/openai_product_tag_description/views/product_template_views.xml @@ -0,0 +1,38 @@ + + + + + + product.template.view.form.inherit.openai.product.tag.description + + product.template + + + + + + + + + + Generate Tags from Description Using Openai + + + list,form + code + action = model.action_create_tag_description() + + + + + Generate Description Using Openai + + + list,form + code + action = model.generate_description_from_tags() + + +