diff --git a/mailer_cloud_connector/README.rst b/mailer_cloud_connector/README.rst new file mode 100644 index 000000000..08544db33 --- /dev/null +++ b/mailer_cloud_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 + +Mailer Cloud Connector +====================== +Odoo MailerCloud Connector + +Configuration +============= +Set up your account's api key in odoo and sync your contacts using special properties + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V17) Afra K, 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/mailer_cloud_connector/__init__.py b/mailer_cloud_connector/__init__.py new file mode 100644 index 000000000..f8fa3c013 --- /dev/null +++ b/mailer_cloud_connector/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 models diff --git a/mailer_cloud_connector/__manifest__.py b/mailer_cloud_connector/__manifest__.py new file mode 100644 index 000000000..37ef62a99 --- /dev/null +++ b/mailer_cloud_connector/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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': 'Mailer Cloud Connector', + 'version': '17.0.1.0.0', + 'category': 'Email Marketing', + 'summary': 'Connect the odoo to the mailer cloud.', + 'description': 'This module helps to connect the odoo to the mailer cloud and to ' + 'synchronize the contacts', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'sale', 'purchase'], + 'data': [ + 'security/ir.model.access.csv', + 'data/property_data.xml', + 'views/mailer_cloud_sync_views.xml', + 'views/res_partner_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'mailer_cloud_connector/static/src/scss/style.scss', + 'mailer_cloud_connector/static/src/js/form_style.js' + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} + diff --git a/mailer_cloud_connector/data/property_data.xml b/mailer_cloud_connector/data/property_data.xml new file mode 100644 index 000000000..880e1a4a5 --- /dev/null +++ b/mailer_cloud_connector/data/property_data.xml @@ -0,0 +1,81 @@ + + + + + + city + text + + + country + text + + + department + text + + + email + text + + + industry + text + + + job_title + text + + + last_name + text + + + lead_source + text + + + middle_name + text + + + name + text + + + organization + text + + + phone + text + + + salary + number + + + state + text + + + zip + number + + + diff --git a/mailer_cloud_connector/doc/RELEASE_NOTES.md b/mailer_cloud_connector/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f585bd56c --- /dev/null +++ b/mailer_cloud_connector/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 24.01.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Mailer Cloud Connector diff --git a/mailer_cloud_connector/models/__init__.py b/mailer_cloud_connector/models/__init__.py new file mode 100644 index 000000000..c888113a9 --- /dev/null +++ b/mailer_cloud_connector/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 mailer_cloud_sync +from . import mailer_cloud_propeties +from . import mailer_cloud_list +from . import contcat_sync +from . import res_partner diff --git a/mailer_cloud_connector/models/contcat_sync.py b/mailer_cloud_connector/models/contcat_sync.py new file mode 100644 index 000000000..3aa6bdaa4 --- /dev/null +++ b/mailer_cloud_connector/models/contcat_sync.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 + + +class ContactContactSync(models.Model): + """ Model to synchronize the contacts""" + _name = 'contact.sync' + _description = "Contact Sync" + + property_id = fields.Many2one( + 'mailer.cloud.properties', + required=True, string='Mailer Cloud Properties', + help='Reference to the Mailer Cloud properties associated with this record.') + contact_fields = fields.Selection( + selection=lambda self: self.dynamic_selection(), + required=True, string='Odoo Fields', + help='Selection of Odoo fields to be synchronized with Mailer Cloud.') + sync_id = fields.Many2one( + 'mailer.cloud.api.sync', string='Synchronization', + help='Reference to the Mailer Cloud API synchronization associated with this record.') + + def dynamic_selection(self): + """ Generate a dynamic selection for Odoo fields. + + This method dynamically generates a selection list for Odoo fields + based on the available fields in the 'res.partner' model.""" + return [(key, key.capitalize()) for key in self.env['res.partner'].fields_get().keys()] diff --git a/mailer_cloud_connector/models/mailer_cloud_list.py b/mailer_cloud_connector/models/mailer_cloud_list.py new file mode 100644 index 000000000..69626eb09 --- /dev/null +++ b/mailer_cloud_connector/models/mailer_cloud_list.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 + + +class MailerCloudList(models.Model): + """ Model representing a list in the Mailer Cloud.""" + _name = 'mailer.cloud.list' + _description = 'List of Mail Cloud' + + mailer_cloud = fields.Char( + string='Mailer Cloud ID', + help='Unique identifier for the Mailer Cloud associated ' + 'with this record.') + name = fields.Char( + string='Name', + help='Name or title associated with this record.') + authorization_id = fields.Many2one( + 'mailer.cloud.api.sync', + string='Authorization', + help='Reference to the Mailer Cloud API synchronization ' + 'associated with this record.') diff --git a/mailer_cloud_connector/models/mailer_cloud_propeties.py b/mailer_cloud_connector/models/mailer_cloud_propeties.py new file mode 100644 index 000000000..0521eac05 --- /dev/null +++ b/mailer_cloud_connector/models/mailer_cloud_propeties.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +import json +import requests +from odoo import api, fields, models + + +class MailerCloudList(models.Model): + """ + Model representing properties in Mailer Cloud associated with Odoo records. + """ + _name = 'mailer.cloud.properties' + _description = 'List of Mail Cloud properties' + + mailer_cloud = fields.Char(string='Mailer Cloud', + help="Mailer Cloud property identifier.") + name = fields.Char( + string='Property Name', required=True, + help="Name of the Mailer Cloud property.") + type = fields.Selection( + [ + ('text', 'Text'), + ('number', 'Number'), + ('date', 'Date'), + ('textarea', 'Textarea') + ], + string='Type', required=True, + help="Type of the Mailer Cloud property.") + authorization_id = fields.Many2one( + 'mailer.cloud.api.sync', ondelete='cascade', + help="Authorization associated with this property.") + + @api.model + def create(self, vals_list): + """ + Override the create method to synchronize property creation with Mailer Cloud. + + :param vals_list: Dictionary of values for creating the record. + :return: Newly created record. + """ + res = super(MailerCloudList, self).create(vals_list) + try: + url = "https://cloudapi.mailercloud.com/v1/contact/property" + + payload = json.dumps({ + "name": res.name, + "type": res.type + }) + headers = { + 'Authorization': res.authorization_id.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, + data=payload) + res.write({ + 'mailer_cloud': response.json()['id'] + }) + except Exception: + pass + return res diff --git a/mailer_cloud_connector/models/mailer_cloud_sync.py b/mailer_cloud_connector/models/mailer_cloud_sync.py new file mode 100644 index 000000000..5c12a8eb7 --- /dev/null +++ b/mailer_cloud_connector/models/mailer_cloud_sync.py @@ -0,0 +1,279 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +import json +import requests +from odoo import models, fields +from odoo.exceptions import ValidationError + + +class MailerCloudApiSync(models.Model): + """ + Model representing the synchronization configuration for Mailer Cloud API. + + This model stores information about the Mailer Cloud API synchronization, including the API key, + synchronization status, user details, plan information, associated mailing list, contact mappings, + and synchronization activity. + """ + _name = 'mailer.cloud.api.sync' + _description = 'Mail Cloud API' + + api_key = fields.Char( + string='Api Key', + required=True, + help='API key for connecting to Mailer Cloud.') + active = fields.Boolean( + string='Active', + help='Check to activate the Mailer Cloud API synchronization.') + email = fields.Char( + string='Email', + help='Email associated with the Mailer Cloud API user.') + name = fields.Char( + string="Name", + help='Name associated with the Mailer Cloud API user.') + plan = fields.Char( + string='Plan', + help='Current plan of the Mailer Cloud API user.') + remaining_contacts = fields.Integer( + string='Remaining Contacts', + help='Remaining contact quota in the Mailer Cloud API user\'s plan.') + total_contacts = fields.Integer( + string='Total Contacts', + help='Total contact quota in the Mailer Cloud API user\'s plan.') + used_contacts = fields.Integer( + string='Used Contacts', + help='Number of contacts used in the Mailer Cloud API user\'s plan.') + list_id = fields.Many2one( + 'mailer.cloud.list', string='Mailing List', + help='Default mailing list associated with the Mailer Cloud API user.') + contact_mapping_ids = fields.One2many( + 'contact.sync', 'sync_id', string='Contact Mapping Ids', + help='Mappings between Odoo contact fields and Mailer Cloud properties for synchronization.') + contact_sync_active = fields.Boolean(string='Contact Sync Active', + help='Check to activate contact synchronization with Mailer Cloud.') + contact_sync_time = fields.Datetime(string='Contact Sync time', + help='Timestamp of the last contact synchronization activity.') + + def action_sync(self): + """ + Test connection to Mailer Cloud API and synchronize information. + + This function tests the connection to the Mailer Cloud API and retrieves information + about the API user's plan. It updates the relevant fields in the current record and triggers + synchronization of lists and properties associated with the API user. + + :raises: ValidationError if there is an issue with the API connection or synchronization process. + """ + self.write({'contact_mapping_ids': [(5, 0, 0)]}) + try: + url = "https://cloudapi.mailercloud.com/v1/client/plan" + payload = "" + headers = { + 'Authorization': self.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("GET", url, headers=headers, data=payload) + if response.status_code == 200: + self.write({ + 'email': response.json()['data']['email'], + 'name': response.json()['data']['name'], + 'plan': response.json()['data']['plan'], + 'remaining_contacts': response.json()['data'][ + 'remaining_contacts'], + 'total_contacts': response.json()['data'][ + 'total_contacts'], + 'used_contacts': response.json()['data']['used_contacts'], + 'active': True, + 'contact_mapping_ids': + [(0, 0, {'property_id': self.env.ref( + 'mailer_cloud_connector.property_data_name').id, + 'contact_fields': 'name'}), + (0, 0, {'property_id': self.env.ref( + 'mailer_cloud_connector.property_data_email').id, + 'contact_fields': 'email'})] + }) + self.get_list(self.id) + self.get_properties() + else: + raise ValidationError(response.json()['errors'][0]['message']) + except Exception as e: + raise ValidationError(e) + + def get_list(self, user): + """ + Retrieve Mailer Cloud lists associated with the current API user. + + This function sends a request to the Mailer Cloud API to retrieve lists related to the + current API's authorization. It processes the response and creates records in the 'mailer.cloud.list' + model in Odoo. + + :param user: The authorization user associated with the lists. + :raises: ValidationError if there is an issue with the retrieval or record creation process. + """ + self.env['mailer.cloud.list'].search([]).unlink() + try: + url = "https://cloudapi.mailercloud.com/v1/lists/search" + payload = json.dumps({ + "limit": 100, + "list_type": 1, + "page": 1, + "search_name": "", + "sort_field": "name", + "sort_order": "asc" + }) + headers = { + 'Authorization': self.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, data=payload) + if response.status_code == 200: + for rec in response.json()['data']: + self.env['mailer.cloud.list'].create({ + 'name': rec['name'], + 'mailer_cloud': rec['id'], + 'authorization_id': user, + }) + elif response.status_code == 400: + raise ValidationError(response.json()['error']['message']) + elif response.status_code == 401: + raise ValidationError(response.json()['errors'][0]['message']) + except Exception as e: + raise ValidationError(e) + + def get_properties(self): + """ + Retrieve Mailer Cloud contact properties associated with the current API. + + This function sends a request to the Mailer Cloud API to retrieve contact properties + related to the current API's authorization. It processes the response and inserts + new properties into the 'mailer.cloud.properties' model in Odoo. + + :raises: ValidationError if there is an issue with the retrieval or insertion process. + """ + try: + url = "https://cloudapi.mailercloud.com/v1/contact/property/search" + payload = json.dumps({ + "limit": 100, + "page": 1, + "search": "" + }) + headers = { + 'Authorization': self.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, data=payload) + if response.status_code == 200: + for record in response.json()['data']: + if record['field_value'] not in self.env['mailer.cloud.properties'].search( + [('authorization_id', '=', False)]).mapped('name'): + if record['field_type'] == 'Text': + type_name = 'text' + elif record['field_type'] == 'Number': + type_name = 'number' + elif record['field_type'] == 'Date': + type_name = 'date' + elif record['field_type'] == 'Textarea': + type_name = 'textarea' + self.env.cr.execute("""INSERT INTO mailer_cloud_properties( + mailer_cloud,name,type,authorization_id)VALUES('%s','%s','%s',%s)""" % ( + record['id'], record['field_value'], type_name, self.id)) + elif response.status_code == 400: + raise ValidationError(response.json()['error']['message']) + elif response.status_code == 401: + raise ValidationError(response.json()['errors'][0]['message']) + except Exception as e: + raise ValidationError(e) + + def action_contact_sync(self): + """ + Synchronize contacts with Mailer Cloud. + + This function synchronizes contacts from Odoo's 'res.partner' model to Mailer Cloud. + It constructs the contact details and sends a batch request to the Mailer Cloud + API for contact synchronization. + + :raises: ValidationError if there is an issue with the synchronization process. + """ + if self.list_id: + try: + contact_details = [] + contact_details.clear() + res = self.env['res.partner'].search([], limit=50) + for j in res: + contact_details_dict = {} + contact_details_dict.clear() + for i in range( + len(self.contact_mapping_ids.mapped( + 'property_id.name'))): + if self.env['mailer.cloud.properties'].search( + [('id', '=', + self.contact_mapping_ids.mapped( + 'property_id')[ + i].id)]).mailer_cloud: + contact_details_dict['custom_fields'] = { + self.contact_mapping_ids.mapped( + 'property_id.mailer_cloud')[i]: self.env['res.partner'].search_read( + [('id', '=', j.id)], [self.contact_mapping_ids.mapped('contact_fields')[i]])[0][ + self.contact_mapping_ids.mapped( + 'contact_fields')[i]] or ' '} + for key, value in contact_details_dict['custom_fields'].items(): + if isinstance(value, float): + contact_details_dict[ + 'custom_fields'].update( + {key: round(value)}) + else: + contact_details_dict[ + self.contact_mapping_ids.mapped( + 'property_id.name')[ + i]] = self.env['res.partner'].search_read( + [('id', '=', j.id)], [ + self.contact_mapping_ids.mapped( + 'contact_fields')[i]])[0][ + self.contact_mapping_ids.mapped( + 'contact_fields')[i]] or ' ' + for key, value in contact_details_dict.items(): + if isinstance(value, float): + contact_details_dict.update({key: round(value)}) + contact_details.append(contact_details_dict) + url = "https://cloudapi.mailercloud.com/v1/contacts/batch" + payload = json.dumps({ + "contacts": contact_details, + "list_id": self.list_id.mailer_cloud + }) + headers = { + 'Authorization': self.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, data=payload) + if response.status_code == 200: + self.write({ + 'contact_sync_active': True, + 'contact_sync_time': fields.Datetime.now() + }) + elif response.status_code == 400: + raise ValidationError(response.json()['errors']['message']) + elif response.status_code == 401: + raise ValidationError( + response.json()['errors'][0]['message']) + except Exception as e: + raise ValidationError(e) + else: + raise ValidationError("Please Choose a List") diff --git a/mailer_cloud_connector/models/res_partner.py b/mailer_cloud_connector/models/res_partner.py new file mode 100644 index 000000000..8648e6707 --- /dev/null +++ b/mailer_cloud_connector/models/res_partner.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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 . +# +############################################################################# +import json +import requests +from odoo import api, fields, models +from odoo.exceptions import ValidationError + + +class InheritContacts(models.Model): + """ + Extends the base 'res.partner' model to include additional fields related to Mailer Cloud integration. + + This class inherits from the 'res.partner' model and adds custom fields for Mailer Cloud integration, + including 'partner_type' and 'mailer_cloud'. + """ + _inherit = 'res.partner' + + partner_type = fields.Char( + string='Partner Type', compute='_compute_partner_type', + help='Type of the partner, computed based on specific criteria.') + mailer_cloud = fields.Char(string='Mailer Cloud', + help='Identifier for the partner in ' + 'Mailer Cloud.') + + def _compute_partner_type(self): + """ + Compute method to determine the 'partner_type' based on specific criteria. + + This method computes the 'partner_type' field based on certain conditions or criteria. + """ + for rec in self: + if rec.sale_order_count > 0 and rec.purchase_order_count > 0: + rec.partner_type = "Vendor and Customer" + elif rec.sale_order_count > 0: + rec.partner_type = "Customer" + elif rec.purchase_order_count > 0: + rec.partner_type = "Vendor" + else: + rec.partner_type = None + + @api.model + def create(self, vals_list): + """ + Create method to extend the creation of 'res.partner' records and synchronize data with Mailer Cloud. + + This method is called when creating a new 'res.partner' record. It extends the base creation process + to include synchronization with Mailer Cloud, if contact synchronization is active for any associated API. + + :param vals_list: List of dictionaries containing values for the new 'res.partner' record(s). + :return: Created 'res.partner' record(s). + :raises: ValidationError if there is an issue with the Mailer Cloud API synchronization. + """ + res = super(InheritContacts, self).create(vals_list) + contact_sync = self.env['mailer.cloud.api.sync'].search( + [('contact_sync_active', '=', True)], + order='contact_sync_time desc', limit=1) + if contact_sync: + try: + for rec in contact_sync: + contact_details_dict = {} + contact_details_dict.clear() + for i in range( + len(rec.contact_mapping_ids.mapped( + 'property_id.name'))): + if self.env['mailer.cloud.properties'].search([('id', '=', rec.contact_mapping_ids.mapped( + 'property_id')[i].id)]).mailer_cloud: + contact_details_dict['custom_fields'] = { + rec.contact_mapping_ids.mapped('property_id.mailer_cloud')[i]: + res.read([rec.contact_mapping_ids.mapped('contact_fields')[i]])[0][ + rec.contact_mapping_ids.mapped('contact_fields')[i]] or ' '} + for key, value in contact_details_dict['custom_fields'].items(): + if isinstance(value, float): + contact_details_dict[ + 'custom_fields'].update( + {key: round(value)}) + else: + contact_details_dict[ + rec.contact_mapping_ids.mapped( + 'property_id.name')[ + i]] = res.read([rec.contact_mapping_ids.mapped('contact_fields')[i]])[0][ + rec.contact_mapping_ids.mapped('contact_fields')[i]] or ' ' + for key, value in contact_details_dict.items(): + if isinstance(value, float): + contact_details_dict.update( + {key: round(value)}) + contact_details_dict[ + 'list_id'] = rec.list_id.mailer_cloud + url = "https://cloudapi.mailercloud.com/v1/contacts" + payload = json.dumps(contact_details_dict) + headers = { + 'Authorization': rec.api_key, + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, data=payload) + if response.status_code in (400, 401): + raise ValidationError( + response.json()['errors'][0]['message']) + except Exception as e: + raise ValidationError(e) + return res + + def write(self, vals): + """ + Extend the standard write method for 'res.partner' records and synchronize updates with Mailer Cloud. + + This method is called when updating an existing 'res.partner' record. It extends the base write process + to include synchronization with Mailer Cloud if contact synchronization is active for any associated API. + + :param vals: Dictionary of field-value pairs to update for the 'res.partner' record. + :return: Result of the standard write method. + :raises: ValidationError if there is an issue with the Mailer Cloud API synchronization. + """ + res = super(InheritContacts, self).write(vals) + contact_sync = self.env['mailer.cloud.api.sync'].search( + [('contact_sync_active', '=', True)], order='contact_sync_time desc', limit=1) + if contact_sync: + update_dict = {} + for key, vals in vals.items(): + for rec in contact_sync.contact_mapping_ids: + if key == rec.contact_fields and rec.property_id.mailer_cloud: + update_dict['custom_fields'] = { + rec.property_id.mailer_cloud: round(vals) if type(vals) == float else vals} + elif key == rec.contact_fields: + update_dict[key] = round(vals) if type(vals) == float else vals + else: + continue + if len(update_dict) > 0: + try: + url = "https://cloudapi.mailercloud.com/v1/contacts/" + self.email + payload = json.dumps(update_dict) + headers = { + 'Authorization': contact_sync.api_key, + 'Content-Type': 'application/json' + } + requests.request("PUT", url, headers=headers, data=payload) + except Exception as e: + raise ValidationError(e) + else: + pass + return res diff --git a/mailer_cloud_connector/security/ir.model.access.csv b/mailer_cloud_connector/security/ir.model.access.csv new file mode 100644 index 000000000..29457d8da --- /dev/null +++ b/mailer_cloud_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 +mailer_cloud_connector.access_mailer_cloud_api_sync,access_mailer_cloud_api_sync,mailer_cloud_connector.model_mailer_cloud_api_sync,base.group_user,1,1,1,1 +mailer_cloud_connector.access_mailer_cloud_list,access_mailer_cloud_list,mailer_cloud_connector.model_mailer_cloud_list,base.group_user,1,1,1,1 +mailer_cloud_connector.access_mailer_cloud_properties,access_mailer_cloud_properties,mailer_cloud_connector.model_mailer_cloud_properties,base.group_user,1,1,1,1 +mailer_cloud_connector.access_contact_sync,access_contact_sync,mailer_cloud_connector.model_contact_sync,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/mailer_cloud_connector/static/description/assets/icons/capture (1).png b/mailer_cloud_connector/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/capture (1).png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/check.png b/mailer_cloud_connector/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/check.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/chevron.png b/mailer_cloud_connector/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/chevron.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/cogs.png b/mailer_cloud_connector/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/cogs.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/consultation.png b/mailer_cloud_connector/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/consultation.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/ecom-black.png b/mailer_cloud_connector/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/ecom-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/education-black.png b/mailer_cloud_connector/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/education-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/hotel-black.png b/mailer_cloud_connector/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/hotel-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/img.png b/mailer_cloud_connector/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/img.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/license.png b/mailer_cloud_connector/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/license.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/lifebuoy.png b/mailer_cloud_connector/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/lifebuoy.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/manufacturing-black.png b/mailer_cloud_connector/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/manufacturing-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/photo-capture.png b/mailer_cloud_connector/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/photo-capture.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/pos-black.png b/mailer_cloud_connector/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/pos-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/puzzle.png b/mailer_cloud_connector/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/puzzle.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/restaurant-black.png b/mailer_cloud_connector/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/restaurant-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/service-black.png b/mailer_cloud_connector/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/service-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/trading-black.png b/mailer_cloud_connector/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/trading-black.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/training.png b/mailer_cloud_connector/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/training.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/update.png b/mailer_cloud_connector/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/update.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/user.png b/mailer_cloud_connector/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/user.png differ diff --git a/mailer_cloud_connector/static/description/assets/icons/wrench.png b/mailer_cloud_connector/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/icons/wrench.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/Cybrosys R.png b/mailer_cloud_connector/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/Cybrosys R.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/categories.png b/mailer_cloud_connector/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/categories.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/check-box.png b/mailer_cloud_connector/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/check-box.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/compass.png b/mailer_cloud_connector/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/compass.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/corporate.png b/mailer_cloud_connector/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/corporate.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/customer-support.png b/mailer_cloud_connector/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/customer-support.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/cybrosys-logo.png b/mailer_cloud_connector/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/cybrosys-logo.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/email.svg b/mailer_cloud_connector/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/features.png b/mailer_cloud_connector/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/features.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/logo.png b/mailer_cloud_connector/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/logo.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/phone.svg b/mailer_cloud_connector/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/pictures.png b/mailer_cloud_connector/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/pictures.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/pie-chart.png b/mailer_cloud_connector/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/pie-chart.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/right-arrow.png b/mailer_cloud_connector/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/right-arrow.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/star (1) 2.svg b/mailer_cloud_connector/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/star.png b/mailer_cloud_connector/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/star.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/support (1) 1.svg b/mailer_cloud_connector/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/support-email.svg b/mailer_cloud_connector/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/support.png b/mailer_cloud_connector/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/support.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/tick-mark.svg b/mailer_cloud_connector/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/whatsapp 1.svg b/mailer_cloud_connector/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/misc/whatsapp.png b/mailer_cloud_connector/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/misc/whatsapp.png differ diff --git a/mailer_cloud_connector/static/description/assets/misc/whatsapp.svg b/mailer_cloud_connector/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/mailer_cloud_connector/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mailer_cloud_connector/static/description/assets/modules/1.gif b/mailer_cloud_connector/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/1.gif differ diff --git a/mailer_cloud_connector/static/description/assets/modules/1.png b/mailer_cloud_connector/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/1.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/2.png b/mailer_cloud_connector/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/2.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/3.png b/mailer_cloud_connector/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/3.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/4.jpg b/mailer_cloud_connector/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/4.jpg differ diff --git a/mailer_cloud_connector/static/description/assets/modules/5.jpg b/mailer_cloud_connector/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/5.jpg differ diff --git a/mailer_cloud_connector/static/description/assets/modules/6.png b/mailer_cloud_connector/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/6.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/l2.png b/mailer_cloud_connector/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/l2.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/l3.png b/mailer_cloud_connector/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/l3.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/l4.png b/mailer_cloud_connector/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/l4.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/l5.png b/mailer_cloud_connector/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/l5.png differ diff --git a/mailer_cloud_connector/static/description/assets/modules/l6.png b/mailer_cloud_connector/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/modules/l6.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/hero.gif b/mailer_cloud_connector/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..257f6f124 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/hero.gif differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image1.png b/mailer_cloud_connector/static/description/assets/screenshots/image1.png new file mode 100644 index 000000000..8cbb38da0 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image1.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image2.png b/mailer_cloud_connector/static/description/assets/screenshots/image2.png new file mode 100644 index 000000000..2a11b9db5 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image2.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image3.png b/mailer_cloud_connector/static/description/assets/screenshots/image3.png new file mode 100644 index 000000000..1a002f0c0 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image3.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image4.png b/mailer_cloud_connector/static/description/assets/screenshots/image4.png new file mode 100644 index 000000000..14068471a Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image4.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image5.png b/mailer_cloud_connector/static/description/assets/screenshots/image5.png new file mode 100644 index 000000000..54fc713d6 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image5.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image6.png b/mailer_cloud_connector/static/description/assets/screenshots/image6.png new file mode 100644 index 000000000..69b34ae16 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image6.png differ diff --git a/mailer_cloud_connector/static/description/assets/screenshots/image7.png b/mailer_cloud_connector/static/description/assets/screenshots/image7.png new file mode 100644 index 000000000..c8b0768d7 Binary files /dev/null and b/mailer_cloud_connector/static/description/assets/screenshots/image7.png differ diff --git a/mailer_cloud_connector/static/description/banner.jpg b/mailer_cloud_connector/static/description/banner.jpg new file mode 100644 index 000000000..c929fbcb4 Binary files /dev/null and b/mailer_cloud_connector/static/description/banner.jpg differ diff --git a/mailer_cloud_connector/static/description/icon.png b/mailer_cloud_connector/static/description/icon.png new file mode 100644 index 000000000..3c290915b Binary files /dev/null and b/mailer_cloud_connector/static/description/icon.png differ diff --git a/mailer_cloud_connector/static/description/index.html b/mailer_cloud_connector/static/description/index.html new file mode 100644 index 000000000..810c7f150 --- /dev/null +++ b/mailer_cloud_connector/static/description/index.html @@ -0,0 +1,729 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Mailer Cloud Connector

+

+ This module helps you to connect the odoo to the mailer cloud. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Connect Multiple Apis +

+
+
+
+
+
+
+ +
+
+

+ + Connect Contact create and update action with Mailer Cloud. +

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

+ Create the account in the mailer cloud and go to the Account +

+
+
+
+
+
+
+ +
+
+

+ Under the Integration there is a button API Keys +

+
+
+
+
+
+
+ +
+
+

+ Create a new API key. +

+
+
+
+
+
+
+ +
+
+

+ New API Key +

+
+
+
+
+
+
+ +
+
+

+ Test Connection +

+

Add the Api Key and test the connection

+
+
+
+
+
+
+ +
+
+

+ Mailer Cloud Property creation area +

+

After test connection successful we can create mailer cloud properties

+
+
+
+
+
+
+ +
+
+

+ Connecting Odoo contacts with Mailer Cloud +

+
+
+
+
+
+
+
    +
  • + You can sync Odoo contacts with multiple Apis. +
  • +
  • + + After Connecting with Odoo the contact creation and update of Odoo action automatically connected with Mailer Cloud +
  • +
  • + Support in Community, Enterprise & Odoo.sh. +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:27th Jan 2024 +
+

+ Initial commit for Mailer Cloud 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/mailer_cloud_connector/static/src/scss/style.scss b/mailer_cloud_connector/static/src/scss/style.scss new file mode 100644 index 000000000..1a9ea287f --- /dev/null +++ b/mailer_cloud_connector/static/src/scss/style.scss @@ -0,0 +1,3 @@ +.o_form_view.o_xxl_form_view .mailer_cloud .o_form_sheet_bg > .o_form_sheet { + width: 60% !important; +} \ No newline at end of file diff --git a/mailer_cloud_connector/views/mailer_cloud_sync_views.xml b/mailer_cloud_connector/views/mailer_cloud_sync_views.xml new file mode 100644 index 000000000..bc256c31a --- /dev/null +++ b/mailer_cloud_connector/views/mailer_cloud_sync_views.xml @@ -0,0 +1,102 @@ + + + + + mailer.cloud.api.sync.view.form + mailer.cloud.api.sync + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + +