diff --git a/odoo_google_contact_integration/README.rst b/odoo_google_contact_integration/README.rst new file mode 100644 index 000000000..8b92954da --- /dev/null +++ b/odoo_google_contact_integration/README.rst @@ -0,0 +1,55 @@ +.. 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 + +Google Contact Connector +======================== +Google Contact Connector module helps to Synchronize Google Contacts. + +Features +======== +* Import Odoo contacts to Google. +* Delete contact from Odoo and Google. +* Export Google contacts to Odoo. +* Filter contact synced with Google. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V16) Gion Dany, + (V17) Farhana Jahan PT, + 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_google_contact_integration/__init__.py b/odoo_google_contact_integration/__init__.py new file mode 100644 index 000000000..038a54749 --- /dev/null +++ b/odoo_google_contact_integration/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 controllers +from . import models diff --git a/odoo_google_contact_integration/__manifest__.py b/odoo_google_contact_integration/__manifest__.py new file mode 100644 index 000000000..f7a61e1a5 --- /dev/null +++ b/odoo_google_contact_integration/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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': "Google Contact Connector", + 'version': '17.0.1.0.0', + 'summary': """Synchronize Google Contacts (Import/Export).""", + 'description': 'The Google Contact Connector module helps you import Google' + ' contacts from Odoo and export Google contacts to Odoo.', + "category": "Extra Tools", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['contacts'], + 'website': 'https://www.cybrosys.com', + 'data': [ + 'views/res_company_views.xml', + 'views/res_partner_views.xml' + ], + 'images': ['static/description/banner.jpg'], + 'license': "AGPL-3", + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/odoo_google_contact_integration/controllers/__init__.py b/odoo_google_contact_integration/controllers/__init__.py new file mode 100644 index 000000000..09b7d50b5 --- /dev/null +++ b/odoo_google_contact_integration/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 google_contact_integration diff --git a/odoo_google_contact_integration/controllers/google_contact_integration.py b/odoo_google_contact_integration/controllers/google_contact_integration.py new file mode 100644 index 000000000..82b42e3b0 --- /dev/null +++ b/odoo_google_contact_integration/controllers/google_contact_integration.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 datetime +import requests +from odoo import _ +from odoo import http +from odoo.exceptions import UserError +from odoo.http import request + +TIMEOUT = 20 + + +class GoogleContactAuth(http.Controller): + """Controller for Google Contact authentication. """ + @http.route('/google_contact_authentication', type="http", auth="public", + website=True) + def get_auth_code(self, **kw): + """Connect your Google account with the OAuth Authentication process. + You will be redirected to the Google login page + where you will need to accept the permission.""" + user_id = request.uid + company_id = http.request.env['res.users'].sudo().search( + [('id', '=', user_id)], limit=1).company_id + if kw.get('code'): + company_id.write( + {'contact_company_authorization_code': kw.get('code')}) + data = { + 'code': kw.get('code'), + 'client_id': company_id.contact_client_id, + 'client_secret': company_id.contact_client_secret, + 'redirect_uri': company_id.contact_redirect_uri, + 'grant_type': 'authorization_code' + } + response = requests.post( + 'https://accounts.google.com/o/oauth2/token', data=data, + headers={ + 'content-type': 'application/x-www-form-urlencoded'}, + timeout=TIMEOUT) + if response.json() and response.json().get('access_token'): + company_id.write({ + 'contact_company_access_token': + response.json().get('access_token'), + 'contact_company_access_token_expiry': + datetime.datetime.now() + datetime.timedelta( + seconds=response.json().get('expires_in')), + 'contact_company_refresh_token': + response.json().get('access_token'), + }) + return "Authentication Success. You Can Close this window" + else: + raise UserError( + _('Something went wrong during the token generation.' + 'Maybe your Authorization Code is invalid') + ) diff --git a/odoo_google_contact_integration/doc/RELEASE_NOTES.md b/odoo_google_contact_integration/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d47ddbecc --- /dev/null +++ b/odoo_google_contact_integration/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 21.03.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Google Contact Connector diff --git a/odoo_google_contact_integration/models/__init__.py b/odoo_google_contact_integration/models/__init__.py new file mode 100644 index 000000000..cc1f33df9 --- /dev/null +++ b/odoo_google_contact_integration/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 res_partner +from . import res_company diff --git a/odoo_google_contact_integration/models/res_company.py b/odoo_google_contact_integration/models/res_company.py new file mode 100644 index 000000000..8df71fec0 --- /dev/null +++ b/odoo_google_contact_integration/models/res_company.py @@ -0,0 +1,180 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 logging +import requests +from odoo import api, fields, models, _ +from odoo.exceptions import UserError, ValidationError +from odoo.http import request + +_logger = logging.getLogger(__name__) + +TIMEOUT = 20 + + +class ResCompany(models.Model): + """Inherit res_company for integrating contacts with Google""" + _inherit = "res.company" + + contact_client_id = fields.Char( + string="Client Id", help='People API Client ID') + contact_client_secret = fields.Char( + string="Client Secret", help='People API Client Secret') + contact_redirect_uri = fields.Char( + string="Authorized redirect URIs", + compute="_compute_contact_redirect_uri", + help='People API Authorized redirect URIs') + contact_company_access_token = fields.Char( + string="Access Token", copy=False, readonly=True, + help='People API Access Token') + contact_company_access_token_expiry = fields.Datetime( + string="Token expiry", help='People API Token Expiry', + readonly=True) + contact_company_refresh_token = fields.Char( + string="Refresh Token", copy=False, readonly=True, + help='People API Refresh Token') + contact_company_authorization_code = fields.Char( + string="Authorization Code", readonly=True, + help='People API Authorization Code') + + @api.depends('contact_redirect_uri') + def _compute_contact_redirect_uri(self): + """Compute the redirect URI for onedrive and Google Drive""" + for rec in self: + base_url = request.env['ir.config_parameter'].get_param( + 'web.base.url') + rec.contact_redirect_uri = base_url + '/google_contact_authentication' + + def action_google_contact_authenticate(self): + """Authenticate the connection to Google.""" + if not self.contact_client_id: + raise ValidationError("Please Enter Client ID") + if not self.contact_redirect_uri: + raise ValidationError("Please Enter Client Secret") + people_scope = 'https://www.googleapis.com/auth/contacts' + url = ( + "https://accounts.google.com/o/oauth2/v2/auth?response_type=code" + "&access_type=offline&client_id={}&redirect_uri={}&scope={} " + ).format(self.contact_client_id, + self.contact_redirect_uri, people_scope) + return { + "type": 'ir.actions.act_url', + "url": url, + "target": "new" + } + + def action_google_contact_refresh_token(self): + """Request a refresh token from Google.""" + if not self.contact_client_id: + raise UserError( + _('Client ID is not yet configured.')) + if not self.contact_client_secret: + raise UserError( + _('Client Secret is not yet configured.')) + if not self.contact_company_refresh_token: + raise UserError( + _('Refresh Token is not yet configured.')) + data = { + 'client_id': self.contact_client_id, + 'client_secret': self.contact_client_secret, + 'refresh_token': self.contact_company_refresh_token, + 'grant_type': 'refresh_token', + } + response = requests.post( + 'https://accounts.google.com/o/oauth2/token', data=data, + headers={ + 'content-type': 'application/x-www-form-urlencoded'}, + timeout=TIMEOUT) + if response.json() and response.json().get('access_token'): + self.write({ + 'contact_company_access_token': + response.json().get('access_token'), + }) + else: + raise UserError( + _('Something went wrong during the token generation.' + ' Please request again an authorization code.') + ) + + def action_import_google_contacts(self): + """IMPORT Contacts FROM Google TO ODOO""" + url = ("https://people.googleapis.com/v1/people/me/" + "connections?personFields=names,addresses," + "emailAddresses,phoneNumbers&pageSize=1000") + headers = { + 'Authorization': f'Bearer {self.contact_company_access_token}', + 'Content-Type': 'application/json' + } + response = requests.get(url, headers=headers) + if response.status_code == 200: + data = response.json().get('connections', []) + partners = [] + for connection in data: + cnt_rsr_name = connection.get('resourceName', '') + etag = connection.get('etag', '') + names = connection.get('names', [{}])[0] + first_name = names.get('givenName', '') + last_name = names.get('familyName', '') + name = names.get('displayName', '') + emailAddresses = connection.get('emailAddresses', [{}])[0] + email = emailAddresses.get('value', '') + phoneNumbers = connection.get('phoneNumbers', [{}])[0] + phone = phoneNumbers.get('value', '') + addresses = connection.get('addresses', [{}])[0] + street = addresses.get('streetAddress', '') + street2 = addresses.get('extendedAddress', '') + city = addresses.get('city', '') + pin = addresses.get('postalCode', '') + state = addresses.get('region', '') + state = self.env['res.country.state'].search( + [("name", 'ilike', state)], limit=1) + state_id = state.id if state else False + country_code = addresses.get('countryCode', '') + country = self.env['res.country'].search( + [('code', 'ilike', country_code)], limit=1) + country_id = country.id if country else False + partner_vals = { + 'name': name or '', + 'first_name': first_name or '', + 'last_name': last_name or '', + 'email': email or '', + 'street': street or '', + 'street2': street2 or '', + 'city': city or '', + 'zip': pin or '', + 'state_id': state_id or False, + 'country_id': country_id or False, + 'phone': phone, + 'google_resource': cnt_rsr_name, + 'google_etag': etag, + } + existing_partner = self.env['res.partner'].search( + [('google_resource', '=', cnt_rsr_name)], limit=1) + if existing_partner: + existing_partner.write(partner_vals) + else: + partners.append(partner_vals) + if partners: + self.env['res.partner'].create(partners) + _logger.info("Contact imported successfully!") + else: + error_message = f"Failed to import contact. Error: {response.text}" + raise ValidationError(error_message) diff --git a/odoo_google_contact_integration/models/res_partner.py b/odoo_google_contact_integration/models/res_partner.py new file mode 100644 index 000000000..ecfc01035 --- /dev/null +++ b/odoo_google_contact_integration/models/res_partner.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 logging +import requests +from odoo import fields, models +from odoo.exceptions import ValidationError + +_logger = logging.getLogger(__name__) + +TIMEOUT = 20 + + +class ResPartner(models.Model): + """Inherit res_partner for integrating contacts with Google""" + _inherit = 'res.partner' + + google_resource = fields.Char('Google Contact Id', + help='Contact Unique identifier', + readonly=True) + google_etag = fields.Char( + 'Google Etag', help='Contact Version control key', readonly=True) + first_name = fields.Char( + 'First Name', help='Enter the first name of the person.') + last_name = fields.Char( + 'Last Name', help='Enter the last name of the person.') + + def action_export_google_contacts(self): + """Export Contacts FROM Google TO ODOO""" + current_uid = self._context.get('uid') + user_id = self.env['res.users'].browse(current_uid) + company_id = user_id.company_id + partner_ids = self.env['res.partner'].sudo().browse( + self.env.context.get('active_ids')) + for partner in partner_ids: + header = { + 'Authorization': + f'Bearer {company_id.contact_company_access_token}', + 'Content-Type': 'application/json' + } + contact_payload = { + 'names': [ + { + 'givenName': partner.first_name or partner.name, + 'familyName': partner.last_name or '' + } + ], + 'emailAddresses': [ + { + 'value': partner.email or '', + 'type': 'work' + } + ], + 'phoneNumbers': [ + { + 'value': partner.phone or '', + 'type': 'work' + } + ], + 'addresses': [ + { + 'streetAddress': partner.street or '', + 'city': partner.city or '', + 'region': partner.state_id.name or '', + 'postalCode': partner.zip or '', + 'country': partner.country_id.name or '', + 'type': 'work' + } + ], + 'organizations': [ + { + 'name': partner.company_id.name or '', + 'title': partner.title or '', + 'type': 'work' + } + ] + } + if partner.google_etag: + contact_resource_name = partner.google_resource + contact_payload['resourceName'] = contact_resource_name + contact_payload['etag'] = partner.google_etag + url = ( + f"https://people.googleapis.com/v1/{contact_resource_name}:updateContact?" + "updatePersonFields=emailAddresses,names,phoneNumbers," + "addresses,organizations,userDefined&" + "prettyPrint=false" + ) + response = requests.patch(url, headers=header, + json=contact_payload) + if response.status_code == 200: + partner.write({ + 'google_resource': response.json().get('resourceName'), + 'google_etag': response.json().get('etag') + }) + _logger.info("Contact updated successfully!") + else: + error_message = f"Failed to update contact. Error: {response.text}" + raise ValidationError(error_message) + else: + url = 'https://people.googleapis.com/v1/people:createContact' + result = requests.post(url, headers=header, + json=contact_payload) + if result.status_code == 200: + partner.write({ + 'google_resource': result.json().get('resourceName'), + 'google_etag': result.json().get('etag') + }) + _logger.info("Contact exported successfully!") + else: + error_message = f"Failed to export contact. Error: {result.text}" + raise ValidationError(error_message) + + def action_delete_google_contact(self): + """Deleting a contact from Google Contacts""" + current_uid = self._context.get('uid') + user_id = self.env['res.users'].browse(current_uid) + company_id = user_id.company_id + partner_ids = self.env['res.partner'].sudo().browse( + self.env.context.get('active_ids')) + for partner in partner_ids: + contact_resource_name = partner.google_resource + if not contact_resource_name: + _logger.warning( + "Partner %s does not have a Google contact resource name.", + partner.name) + continue + url = f"https://people.googleapis.com/v1/{contact_resource_name}:deleteContact" + headers = { + 'Authorization': f'Bearer {company_id.contact_company_access_token}', + 'Content-Type': 'application/json' + } + response = requests.delete(url, headers=headers) + if response.status_code == 200: + _logger.info("Contact deleted successfully!") + partner.google_resource = '' + partner.google_etag = '' + partner.unlink() + elif response.status_code == 404: + _logger.warning( + "Contact not found in Google. Removing local reference.") + partner.google_resource = '' + partner.google_etag = '' + else: + error_message = f"Failed to delete contact. Error: {response.text}" + raise ValidationError(error_message) diff --git a/odoo_google_contact_integration/static/description/assets/icons/capture (1).png b/odoo_google_contact_integration/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/capture (1).png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/check.png b/odoo_google_contact_integration/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/check.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/chevron.png b/odoo_google_contact_integration/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/chevron.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/cogs.png b/odoo_google_contact_integration/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/cogs.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/consultation.png b/odoo_google_contact_integration/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/consultation.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/ecom-black.png b/odoo_google_contact_integration/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/education-black.png b/odoo_google_contact_integration/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/education-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/hotel-black.png b/odoo_google_contact_integration/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/img.png b/odoo_google_contact_integration/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/img.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/license.png b/odoo_google_contact_integration/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/license.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/lifebuoy.png b/odoo_google_contact_integration/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/manufacturing-black.png b/odoo_google_contact_integration/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/photo-capture.png b/odoo_google_contact_integration/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/photo-capture.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/pos-black.png b/odoo_google_contact_integration/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/pos-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/puzzle.png b/odoo_google_contact_integration/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/puzzle.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/restaurant-black.png b/odoo_google_contact_integration/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/service-black.png b/odoo_google_contact_integration/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/service-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/trading-black.png b/odoo_google_contact_integration/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/trading-black.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/training.png b/odoo_google_contact_integration/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/training.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/update.png b/odoo_google_contact_integration/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/update.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/user.png b/odoo_google_contact_integration/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/user.png differ diff --git a/odoo_google_contact_integration/static/description/assets/icons/wrench.png b/odoo_google_contact_integration/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/wrench.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/Cybrosys R.png b/odoo_google_contact_integration/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/email.svg b/odoo_google_contact_integration/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/phone.svg b/odoo_google_contact_integration/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/star (1) 2.svg b/odoo_google_contact_integration/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/support (1) 1.svg b/odoo_google_contact_integration/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/support-email.svg b/odoo_google_contact_integration/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/tick-mark.svg b/odoo_google_contact_integration/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/whatsapp 1.svg b/odoo_google_contact_integration/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/misc/whatsapp.svg b/odoo_google_contact_integration/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_google_contact_integration/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_google_contact_integration/static/description/assets/modules/1.png b/odoo_google_contact_integration/static/description/assets/modules/1.png new file mode 100644 index 000000000..8c739bd9a Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/1.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/2.jpg b/odoo_google_contact_integration/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..b54c849a1 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/2.jpg differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/3.jpg b/odoo_google_contact_integration/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..ff1198f40 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/3.jpg differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/4.jpg b/odoo_google_contact_integration/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..085d88f43 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/4.jpg differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/5.png b/odoo_google_contact_integration/static/description/assets/modules/5.png new file mode 100644 index 000000000..6b3353888 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/5.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/6.jpg b/odoo_google_contact_integration/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..9f7bf6c1c Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/6.jpg differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/1.png b/odoo_google_contact_integration/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..a841b1b7d Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/1.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/10.png b/odoo_google_contact_integration/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..76878b564 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/10.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/11.png b/odoo_google_contact_integration/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..03772e909 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/11.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/12.png b/odoo_google_contact_integration/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..de6093cd8 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/12.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/13.png b/odoo_google_contact_integration/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..695b46b68 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/13.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/14.png b/odoo_google_contact_integration/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..fecdc04d9 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/14.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/15.png b/odoo_google_contact_integration/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..8fe22f78f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/15.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/16.png b/odoo_google_contact_integration/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..91fd7ff25 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/16.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/17.png b/odoo_google_contact_integration/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..1b4e26a02 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/17.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/18.png b/odoo_google_contact_integration/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..2b3e8af65 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/18.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/19.png b/odoo_google_contact_integration/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..e9d9a4923 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/19.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/2.png b/odoo_google_contact_integration/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..6f08bb403 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/2.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/20.png b/odoo_google_contact_integration/static/description/assets/screenshots/20.png new file mode 100644 index 000000000..06f8040c2 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/20.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/21.png b/odoo_google_contact_integration/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..cbd65a70b Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/21.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/22.png b/odoo_google_contact_integration/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..40acf177c Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/22.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/23.png b/odoo_google_contact_integration/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..b3aa8de6b Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/23.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/3.png b/odoo_google_contact_integration/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..f5f823f73 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/3.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/4.png b/odoo_google_contact_integration/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..aabe3fe60 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/4.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/5.png b/odoo_google_contact_integration/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..bb68b0795 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/5.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/6.png b/odoo_google_contact_integration/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..b5502589e Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/6.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/7.png b/odoo_google_contact_integration/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..0780b9807 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/7.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/8.png b/odoo_google_contact_integration/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..36c98ca8a Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/8.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/9.png b/odoo_google_contact_integration/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..0614c48c9 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/9.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/hero.gif b/odoo_google_contact_integration/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..3f956f768 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_google_contact_integration/static/description/banner.jpg b/odoo_google_contact_integration/static/description/banner.jpg new file mode 100644 index 000000000..897ab34ed Binary files /dev/null and b/odoo_google_contact_integration/static/description/banner.jpg differ diff --git a/odoo_google_contact_integration/static/description/icon.png b/odoo_google_contact_integration/static/description/icon.png new file mode 100644 index 000000000..1b3777fa5 Binary files /dev/null and b/odoo_google_contact_integration/static/description/icon.png differ diff --git a/odoo_google_contact_integration/static/description/index.html b/odoo_google_contact_integration/static/description/index.html new file mode 100644 index 000000000..ed8c1be6f --- /dev/null +++ b/odoo_google_contact_integration/static/description/index.html @@ -0,0 +1,1155 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Google Contact Connector

+

+ A Module For Synchronizing Google Contacts. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Import Odoo Contacts to Google

+

Import Contacts + to Google from Odoo +

+
+
+
+
+
+
+ +
+
+

+ Update Existing Contacts during Google to Odoo + Import

+

Update already + created contacts when importing from Google to + Odoo. +

+
+
+
+
+
+
+ +
+
+

+ Delete contact

+

Delete contact + from Odoo and Google. +

+
+
+
+
+
+
+ +
+
+

+ Export Google contact

+

Export Google + contacts to Odoo. +

+
+
+
+
+
+
+ +
+
+

+ Update Existing Contacts during Google to Odoo + Export

+

Update already + created contacts when exporting from Google to + Odoo. +

+
+
+
+
+
+
+ +
+
+

+ Filter contacts

+

Filter contact + synced with Google. +

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

+ Sign in with your Google Account. To + generate Google Contact API credentials, go + to Google API Platform. + Google + Cloud + Click Enable APIs and Services. +

+
+
+
+
+
+
+ +
+
+

+ In the search bar, look for Google People + API. +

+
+
+
+
+
+
+ +
+
+

+ Select the Google People API and enable + it.

+
+
+
+
+
+
+ +
+
+

+ Click Create Credentials.

+
+
+
+
+
+
+ +
+
+

+ Choose Google People API and the User Data. + Then, click Next.

+
+
+
+
+
+
+ +
+
+

+ Enter the app name and email address. Then, + click Save and Continue.

+
+
+
+
+
+
+ +
+
+

+ Skipped the Third Scope. Save and + Continue.

+
+
+
+
+
+
+ +
+
+

+ Choose Website application and then type the + name of the app.

+
+
+
+
+
+
+ +
+
+

+ In the Authorized JavaScript Origins + section, add your company's Odoo URL. And in the + Authorized redirect URIs section, add your + company's Odoo URL followed by + /google_contact_authentication.

+
+
+
+
+
+
+ +
+
+

+ After successfully generating Google People + API credentials, you will receive a Client + ID and Client Secret.

+
+
+
+
+
+
+ +
+
+

+ Here we can see the Client ID and Secret + Key.

+
+
+
+
+
+
+ +
+
+

+ Also provide users to access the app.

+
+
+
+
+
+
+ +
+
+

+ Go to Settings-> Companies Then click on the + company name and select the Google Contact + tab. Enter the Client id, Client secret and + Redirect Url in Credentials. + After entering all the details click on + Authenticate.

+
+
+
+
+
+
+ +
+
+

+ After successful authentication, now you can + sync Google Contacts with Odoo.

+
+
+
+
+
+
+ +
+
+

+ You can view the contacts list in Google + Contacts. +

+
+
+
+
+
+
+ +
+
+

+ Go to Settings -> Companies -> Select the + 'Google Contact' tab -> Then, click the + 'Import Contacts' button to import Google + contacts into Odoo. +

+
+
+
+
+
+
+ +
+
+

+ Contacts imported into Odoo. +

+
+
+
+
+
+
+ +
+
+

+ Select the contacts that need to be exported + from Odoo to Google. Then, click on the + 'Export to Google' button. +

+
+
+
+
+
+
+ +
+
+

+ Exported contacts from Odoo to Google. +

+
+
+
+
+
+
+ +
+
+

+ Select the contacts that need to be deleted + from both Google and Odoo. Then, click on + the 'Delete G-Contact' button. If that + contact is associated with another model, it + will only be deleted from Google. +

+
+
+
+
+
+
+ +
+
+

+ From Google, the contact has been removed. +

+
+
+
+
+
+
+ +
+
+

+ Click the Filter by 'G-contacts' option to + filter the synchronized contacts. +

+
+
+
+
+
+
+ +
+
+

+ Contacts that synced with Google. +

+
+
+
+
+
+
+
    +
  • + Import Contacts + to Google from Odoo. +
  • +
  • + Update Existing + Contacts during Google to Odoo Import. +
  • +
  • + Delete contact + from Odoo and Google. +
  • +
  • + Export Google + contacts to Odoo. +
  • +
  • + Update Existing + Contacts during Google to Odoo Export. +
  • +
  • + Filter contact + synced with Google. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:21st Mar 2024 +
+

+ Initial Commit for Google Contact 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_google_contact_integration/views/res_company_views.xml b/odoo_google_contact_integration/views/res_company_views.xml new file mode 100644 index 000000000..1ed57fac4 --- /dev/null +++ b/odoo_google_contact_integration/views/res_company_views.xml @@ -0,0 +1,55 @@ + + + + + + res.company.view.form.inherit.odoo.google.contact.integration + + res.company + + + + + + + + + + + + + +