diff --git a/odoo_mysql_connector/README.rst b/odoo_mysql_connector/README.rst new file mode 100755 index 000000000..354ddaa58 --- /dev/null +++ b/odoo_mysql_connector/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Odoo Mysql Connector +==================== +This module will help you to import the data from Mysql database. + +Configuration +============= +Install python-barcode (pip install mysql-connector-python) + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer:(V17) Unnimaya C O, 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_mysql_connector/__init__.py b/odoo_mysql_connector/__init__.py new file mode 100755 index 000000000..cd07869cd --- /dev/null +++ b/odoo_mysql_connector/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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/odoo_mysql_connector/__manifest__.py b/odoo_mysql_connector/__manifest__.py new file mode 100755 index 000000000..cefbc5cbe --- /dev/null +++ b/odoo_mysql_connector/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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': "Odoo Mysql Connector", + 'version': '17.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """This module will help you to import the data from Mysql + database.""", + 'description': """This module will assist you in importing data from + a MySQL database, providing a seamless and efficient solution for + integrating your existing data into the Odoo system.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'data': [ + 'security/ir.model.access.csv', + 'views/mysql_credential_views.xml', + 'views/mysql_connector_views.xml', + ], + 'external_dependencies': { + 'python': ['mysql-connector-python'] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} + diff --git a/odoo_mysql_connector/doc/RELEASE_NOTES.md b/odoo_mysql_connector/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..d53c3d114 --- /dev/null +++ b/odoo_mysql_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 11.02.2025 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for Odoo Mysql Connector diff --git a/odoo_mysql_connector/models/__init__.py b/odoo_mysql_connector/models/__init__.py new file mode 100755 index 000000000..c5d7337dc --- /dev/null +++ b/odoo_mysql_connector/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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 imported_data +from . import mysql_connector +from . import mysql_credential +from . import sync_table diff --git a/odoo_mysql_connector/models/imported_data.py b/odoo_mysql_connector/models/imported_data.py new file mode 100755 index 000000000..74acc26e4 --- /dev/null +++ b/odoo_mysql_connector/models/imported_data.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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 odoo import fields, models + + +class ImportedData(models.Model): + """Model holding imported data""" + _name = 'imported.data' + _description = 'Imported Data' + + model_id = fields.Many2one('ir.model', string='Model', + help='Name of the model') + mysql_ref = fields.Char(string='Mysql Reference', + help='ID of the record in mysql database') + mysql_table = fields.Char(string='Mysql Table', + help='Name of the table in mysql database') + log_note = fields.Text(string='Log Note', + help='Log note regarding the importing') + odoo_ref = fields.Integer(string='Odoo Reference', + help='ID of the record in Odoo database') diff --git a/odoo_mysql_connector/models/mysql_connector.py b/odoo_mysql_connector/models/mysql_connector.py new file mode 100755 index 000000000..3234a0151 --- /dev/null +++ b/odoo_mysql_connector/models/mysql_connector.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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 mysql.connector +from odoo import api, fields, models +from odoo.exceptions import ValidationError + + +class MysqlConnector(models.Model): + """Model for connecting with Mysql""" + _name = 'mysql.connector' + _description = 'Mysql Connector' + + name = fields.Char(string='Name', help='Name of the record', + required=True) + credential_id = fields.Many2one('mysql.credential', + string='Connection', domain="[('state', '=', 'connect')]", + help='Choose the My Sql connection', + required=True) + sql_table = fields.Char(string='Mysql Table Name', + help='Name of the table in Mysql database', + required=True) + model_id = fields.Many2one('ir.model', string='Odoo Table Name', + help='Database table in Odoo to which you have' + ' to map the data', + domain=lambda self: [( + 'access_ids', 'not in', + self.env.user.groups_id.ids)], + required=True, ondelete="cascade") + sync_ids = fields.One2many('sync.table', + 'connection_id', + string='Field Mapping', + help='Select the fields to be mapped') + is_fetched = fields.Boolean(string='Is Fetched', + help='True if once data fetched from mysql') + state = fields.Selection([ + ('draft', 'Draft'), + ('fetched', 'Fetched'), + ('sync', 'Synced') + ], string='Status', readonly=True, copy=False, default='draft', help="State of the record") + + @api.onchange('model_id', 'sql_table') + def _onchange_model_id(self): + """Method for reloading the one2many field""" + self.sync_ids = False + self.is_fetched = False + + def action_sync_table(self): + """Method for syncing tables""" + field_list = self.mysql_connect(f"SHOW COLUMNS FROM {self.sql_table};") + records = self.mysql_connect(f"SELECT * FROM {self.sql_table};") + required_fields = [] + for field in self.env['ir.model.fields'].search( + [('model', '=', self.model_id.model), + ('required', '=', True), + ('ttype', 'not in', + ['one2many', 'many2many'])]).mapped('name'): + if not self.env[self.model_id.model].default_get([field]): + required_fields.append(field) + if not set(required_fields).issubset( + self.sync_ids.ir_field_id.mapped('name')): + missing_fields = set(required_fields) - set( + self.sync_ids.ir_field_id.mapped('name')) + raise ValidationError( + "Must provide values for the Odoo fields {}".format(", ".join( + missing_fields))) + vals = {} + unique = next( + (rec['Field'] for rec in field_list if + rec.get('Key', '').upper() == 'PRI'), + next((rec['Field'] for rec in field_list if + rec.get('Key', '').upper() == 'UNI'), None)) + if not unique: + raise ValidationError( + f"The MySQL table {self.sql_table} cannot be imported " + f"because it " + "doesn't have a Unique or Primary key.") + if records: + for item in records: + imported = self.env['imported.data'].sudo().search( + [('model_id', '=', self.model_id.id), + ('mysql_ref', '=', item[unique]), + ('mysql_table', '=', self.sql_table), + ('log_note', '=', 'Success')]) + if not imported: + mysql_to_odoo_type_mapping = { + 'tinyint': ['boolean'], + 'smallint': ['integer', 'Many2one'], + 'mediumint': ['integer', 'Many2one'], + 'int': ['integer', 'Many2one'], + 'bigint': ['integer', 'Many2one'], + 'float': ['float'], + 'double': ['float'], + 'decimal': ['float'], + 'numeric': ['float'], + 'char': ['char'], + 'varchar': ['char'], + 'text': ['text'], + 'mediumtext': ['text'], + 'longtext': ['text'], + 'binary': ['binary'], + 'varbinary': ['binary'], + 'blob': ['binary'], + 'tinyblob': ['binary'], + 'mediumblob': ['binary'], + 'longblob': ['binary'], + 'date': ['date'], + 'datetime': ['datetime'], + 'timestamp': ['datetime'], + } + for rec in self.sync_ids: + if rec.ir_field_id: + mysql_data_type = rec.data_type.lower().split('(')[0] + if not rec.foreign_key and not ( + rec.ir_field_id.ttype in + mysql_to_odoo_type_mapping[ + mysql_data_type]): + raise ValidationError( + f'Data type of {rec.mysql_field} ' + f'cannot be converted to the data' + f'type of {rec.ir_field_id.name}') + if rec.foreign_key: + foreign_record = self.env[ + 'imported.data'].sudo().search( + [('mysql_table', '=', rec.ref_table), + ('mysql_ref', '=', item[rec.mysql_field])]) + if foreign_record: + if rec.ir_field_id.ttype == 'many2one': + vals[ + rec.ir_field_id.name] = foreign_record.odoo_ref + else: + foreign_record_browse = self.env[foreign_record.model_id.model].browse( + foreign_record.odoo_ref) + rec_name_field = self.env[foreign_record.model_id.model]._rec_name + rec_name_value = getattr(foreign_record_browse, rec_name_field, None) + if rec_name_value is not None: + vals[rec.ir_field_id.name] = rec_name_value + if not foreign_record: + raise ValidationError( + f'The {rec.mysql_field} column ' + f'of {self.sql_table} table establishes a ' + f'foreign key relationship with the ' + f'{rec.ref_table} table in MySQL. Please ' + f' synchronize the {rec.ref_table} table' + f' first.') + else: + vals[rec.ir_field_id.name] = item[rec.mysql_field] + if vals: + record = self.env[self.model_id.model].create(vals) + imported.sudo().create({ + 'model_id': self.model_id.id, + 'mysql_ref': item[unique], + 'mysql_table': self.sql_table, + 'odoo_ref': record.id, + 'log_note': 'Success' + }) + self.write({ + 'state': 'sync' + }) + + def action_fetch_data(self): + """Method for fetching the columns of Mysql table""" + records = self.mysql_connect(f"SHOW COLUMNS FROM {self.sql_table};") + if not any(key in rec.get('Key', '') for rec in records for + key in ['PRI', 'UNI']): + raise ValidationError( + "The MySQL table cannot be imported because it " + "doesn't have a Unique or Primary key.") + self.sync_ids.unlink() + if records: + for rec in records: + constraints = self.mysql_connect( + f"SELECT CONSTRAINT_NAME, COLUMN_NAME," + f" REFERENCED_TABLE_NAME, " + f"REFERENCED_COLUMN_NAME FROM " + f"INFORMATION_SCHEMA.KEY_COLUMN_USAGE " + f"WHERE TABLE_NAME = " + f"'{self.sql_table}' and COLUMN_NAME = " + f"'{rec['Field']}' and REFERENCED_TABLE_NAME != 'None' and " + f"REFERENCED_COLUMN_NAME != 'None'") + vals = { + 'connection_id': self.id, + 'data_type': rec['Type'], + 'mysql_field': rec['Field'], + 'model_id': self.model_id.id, + 'foreign_key': True if constraints else False + } + if constraints: + vals['ref_table'] = constraints[0]['REFERENCED_TABLE_NAME'] + vals['ref_col'] = constraints[0]['REFERENCED_COLUMN_NAME'] + if rec['Field'] not in self.sync_ids.sudo( + ).search([('connection_id', + '=', self.id)]).mapped('mysql_field'): + self.sudo().write({ + 'sync_ids': [ + (0, 0, vals)] + }) + self.write({ + 'state': 'fetched' + }) + + def mysql_connect(self, query): + """Method for connecting with Mysql""" + try: + connection = mysql.connector.connect( + host=self.credential_id.host, + user=self.credential_id.user, + password=self.credential_id.password, + database=self.credential_id.name + ) + if not connection.is_connected(): + raise ValidationError(f"Error connecting to MySQL") + cursor = connection.cursor(dictionary=True) + # Execute your MySQL query + cursor.execute(query) + # Fetch the results and store them in a variable + results = cursor.fetchall() + # Set the flag after successfully fetching the data + self.is_fetched = True + # Close cursor and connection + cursor.close() + connection.close() + return results + except mysql.connector.Error as e: + # Handle any connection errors + raise ValidationError(f"Error connecting to MySQL: {e}") diff --git a/odoo_mysql_connector/models/mysql_credential.py b/odoo_mysql_connector/models/mysql_credential.py new file mode 100755 index 000000000..2b713c287 --- /dev/null +++ b/odoo_mysql_connector/models/mysql_credential.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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 mysql.connector +from odoo import fields, models +from odoo.exceptions import ValidationError + + +class MysqlCredential(models.Model): + """Model holding Mysql credentials""" + _name = 'mysql.credential' + _description = 'Mysql Credential' + + name = fields.Char(string='Database', help='Name of the database', + required=True) + user = fields.Char(string='Username', help='Username of connection', + required=True) + host = fields.Char(string='Host', help='Host name of MySQL connection', + required=True) + password = fields.Char(string='Password', + help='Password of My SQL connection', required=True) + state = fields.Selection([('draft', 'Draft'), + ('connect', 'Connected')], + string='State', help='State of the record', + readonly=True, default='draft') + + def action_connect(self): + """Method for connecting with Mysql""" + try: + connection = mysql.connector.connect( + host=self.host, + user=self.user, + password=self.password, + database=self.name + ) + if connection.is_connected(): + self.sudo().write({ + 'state': 'connect' + }) + except mysql.connector.Error as e: + # Handle any connection errors + raise ValidationError(f"Error connecting to MySQL: {e}") diff --git a/odoo_mysql_connector/models/sync_table.py b/odoo_mysql_connector/models/sync_table.py new file mode 100755 index 000000000..0d24f0dcd --- /dev/null +++ b/odoo_mysql_connector/models/sync_table.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (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 odoo import fields, models + + +class SyncTable(models.Model): + """Model holding the sync details""" + _name = 'sync.table' + _description = 'Sync Table' + + mysql_field = fields.Char(string='Mysql Field', + help='Name of the field in Mysql database') + data_type = fields.Char(string='Datatype', + help='Data type of the field in mysql') + connection_id = fields.Many2one('mysql.connector', string='Connection', + help='Connection corresponds to mapping') + model_id = fields.Many2one(string='Model Name', help='Name of the model', + related='connection_id.model_id') + ir_field_id = fields.Many2one('ir.model.fields', string='Odoo Field', + help='Name of the field in Mysql database', + domain="[('model_id', '=', model_id)]") + ref_table = fields.Char(string='Reference Table', + help='Name of the reference table having ' + 'foreign key') + ref_col = fields.Char(string='Reference Column', + help='Id of the reference table having ' + 'foreign key') + ref_col_name = fields.Char(string='Name of the Column in Reference Table', + help='Name of the column in reference table' + ' to which the records to be compared') + foreign_key = fields.Boolean(string='Foreign Key', + help='True for for foreign keys') + unique = fields.Char(string='Unique', help='Name of Unique field') diff --git a/odoo_mysql_connector/security/ir.model.access.csv b/odoo_mysql_connector/security/ir.model.access.csv new file mode 100755 index 000000000..f0db99b92 --- /dev/null +++ b/odoo_mysql_connector/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mysql_credential_system,access.mysql.credential.system,model_mysql_credential,base.group_system,1,1,1,1 +access_mysql_connector_system,access.mysql.connector.system,model_mysql_connector,base.group_system,1,1,1,1 +access_sync_table_system,access.sync.table.system,model_sync_table,base.group_system,1,1,1,1 +access_imported_data_system,access.imported.data.system,model_imported_data,base.group_system,1,1,1,1 diff --git a/odoo_mysql_connector/static/description/assets/icons/capture (1).png b/odoo_mysql_connector/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/capture (1).png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/check.png b/odoo_mysql_connector/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/check.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/chevron.png b/odoo_mysql_connector/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/chevron.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/cogs.png b/odoo_mysql_connector/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/cogs.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/consultation.png b/odoo_mysql_connector/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/consultation.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/ecom-black.png b/odoo_mysql_connector/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/education-black.png b/odoo_mysql_connector/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/education-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/hotel-black.png b/odoo_mysql_connector/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/img.png b/odoo_mysql_connector/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/img.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/license.png b/odoo_mysql_connector/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/license.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/lifebuoy.png b/odoo_mysql_connector/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/manufacturing-black.png b/odoo_mysql_connector/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/photo-capture.png b/odoo_mysql_connector/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/photo-capture.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/pos-black.png b/odoo_mysql_connector/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/pos-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/puzzle.png b/odoo_mysql_connector/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/puzzle.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/restaurant-black.png b/odoo_mysql_connector/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/service-black.png b/odoo_mysql_connector/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/service-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/trading-black.png b/odoo_mysql_connector/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/trading-black.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/training.png b/odoo_mysql_connector/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/training.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/update.png b/odoo_mysql_connector/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/update.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/user.png b/odoo_mysql_connector/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/user.png differ diff --git a/odoo_mysql_connector/static/description/assets/icons/wrench.png b/odoo_mysql_connector/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/icons/wrench.png differ diff --git a/odoo_mysql_connector/static/description/assets/misc/Cybrosys R.png b/odoo_mysql_connector/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_mysql_connector/static/description/assets/misc/email.svg b/odoo_mysql_connector/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/phone.svg b/odoo_mysql_connector/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/star (1) 2.svg b/odoo_mysql_connector/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/support (1) 1.svg b/odoo_mysql_connector/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/support-email.svg b/odoo_mysql_connector/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/tick-mark.svg b/odoo_mysql_connector/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/whatsapp 1.svg b/odoo_mysql_connector/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/misc/whatsapp.svg b/odoo_mysql_connector/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_mysql_connector/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_mysql_connector/static/description/assets/modules/1.jpg b/odoo_mysql_connector/static/description/assets/modules/1.jpg new file mode 100755 index 000000000..d05b1744e Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/1.jpg differ diff --git a/odoo_mysql_connector/static/description/assets/modules/2.png b/odoo_mysql_connector/static/description/assets/modules/2.png new file mode 100755 index 000000000..164eb62c7 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/2.png differ diff --git a/odoo_mysql_connector/static/description/assets/modules/3.png b/odoo_mysql_connector/static/description/assets/modules/3.png new file mode 100755 index 000000000..3bedf7981 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/3.png differ diff --git a/odoo_mysql_connector/static/description/assets/modules/4.gif b/odoo_mysql_connector/static/description/assets/modules/4.gif new file mode 100755 index 000000000..8ac32db03 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/4.gif differ diff --git a/odoo_mysql_connector/static/description/assets/modules/5.gif b/odoo_mysql_connector/static/description/assets/modules/5.gif new file mode 100755 index 000000000..4e89fa8c8 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/5.gif differ diff --git a/odoo_mysql_connector/static/description/assets/modules/6.jpg b/odoo_mysql_connector/static/description/assets/modules/6.jpg new file mode 100755 index 000000000..67c7f7062 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/modules/6.jpg differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/0.png b/odoo_mysql_connector/static/description/assets/screenshots/0.png new file mode 100644 index 000000000..99da0d83e Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/0.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/1.png b/odoo_mysql_connector/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..8667f5f3c Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/1.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/2.png b/odoo_mysql_connector/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..31e7c08f2 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/2.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/3.png b/odoo_mysql_connector/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b824fadb2 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/3.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/4.png b/odoo_mysql_connector/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..c00672009 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/4.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/5.png b/odoo_mysql_connector/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..8964e7240 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/5.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/6.png b/odoo_mysql_connector/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d28963233 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/6.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/7.png b/odoo_mysql_connector/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..56216e472 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/7.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/8.png b/odoo_mysql_connector/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..98473ad74 Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/8.png differ diff --git a/odoo_mysql_connector/static/description/assets/screenshots/hero.gif b/odoo_mysql_connector/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..7378f03bf Binary files /dev/null and b/odoo_mysql_connector/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_mysql_connector/static/description/banner.jpg b/odoo_mysql_connector/static/description/banner.jpg new file mode 100644 index 000000000..88bd5b628 Binary files /dev/null and b/odoo_mysql_connector/static/description/banner.jpg differ diff --git a/odoo_mysql_connector/static/description/icon.png b/odoo_mysql_connector/static/description/icon.png new file mode 100644 index 000000000..32bde72e2 Binary files /dev/null and b/odoo_mysql_connector/static/description/icon.png differ diff --git a/odoo_mysql_connector/static/description/index.html b/odoo_mysql_connector/static/description/index.html new file mode 100644 index 000000000..d14d07bf3 --- /dev/null +++ b/odoo_mysql_connector/static/description/index.html @@ -0,0 +1,776 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Odoo Mysql Connector

+

+ This Application Enables You to Import the Database Tables from Mysql to Odoo. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Effortlessly import data from Mysql to Odoo.

+
+
+
+
+
+
+ +
+
+

+ Intuitive and Easy-to-use interface.

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

+ Navigate to Credentials menu under Configuration Mysql Connector.

+
+
+
+
+
+
+ +
+
+

+ Add Mysql credentials and click Connect. For testing purpose, you can use the + credentials provided by Free Sql + Database

+
+
+
+
+
+
+ +
+
+

+ We can import the product tabLe from Mysql.

+
+
+
+
+
+
+ +
+
+

+ Navigate to Connector menu under Configuration in Mysql Connector. +

+
+
+
+
+
+
+ +
+
+

+ Add the details and click Fetch Data button.

+
+
+
+
+
+
+ +
+
+

+ Select the fields in the Odoo table that correspond to the MySQL columns for data + mapping. Additionally, if a MySQL field has a foreign key, choose the column name in + the foreign table that contains the value corresponding to the foreign key. Then + click Sync Table. +

+
+
+
+
+
+
+ +
+
+

+ It shows Validation Error, since if any column in Mysql table contains foreign key, + we need to sync the foreign table first. +

+
+
+
+
+
+
+ +
+
+

+ Sync the foreign table. Then only we can sync the main table. +

+
+
+
+
+
+
+ +
+
+

+ The imported product from Mysql. +

+
+
+
+
+
+
+
    +
  • + Effortlessly import data from MySQL to Odoo by mapping + the MySQL columns to the corresponding fields in the Odoo table, ensuring a seamless and + efficient transfer of information between the two systems. +
  • +
  • + Experience a user-friendly interface that is both + intuitive and easy to use, designed to enhance productivity and streamline workflows. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:6th June 2024 +
+

+ Initial Commit for Odoo Mysql Connector +

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

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

Odoo + Customization

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

Odoo + Implementation

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

Odoo + Support

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

Hire + Odoo Developer

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

Odoo + Integration

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

Odoo + Migration

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

Odoo + Consultancy

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

Odoo + Implementation

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

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

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

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/odoo_mysql_connector/views/mysql_connector_views.xml b/odoo_mysql_connector/views/mysql_connector_views.xml new file mode 100755 index 000000000..59d46dbaa --- /dev/null +++ b/odoo_mysql_connector/views/mysql_connector_views.xml @@ -0,0 +1,70 @@ + + + + + mysql.connector + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + mysql.connector + + + + + + + + + + + + Connector + mysql.connector + tree,form + + + +
diff --git a/odoo_mysql_connector/views/mysql_credential_views.xml b/odoo_mysql_connector/views/mysql_credential_views.xml new file mode 100755 index 000000000..12cece223 --- /dev/null +++ b/odoo_mysql_connector/views/mysql_credential_views.xml @@ -0,0 +1,59 @@ + + + + + mysql.credential + +
+
+
+ + + + + + + + + + + + +
+
+
+ + + mysql.credential + + + + + + + + + + + Credentials + mysql.credential + tree,form + + + + + + + +