diff --git a/odoo_google_contact_integration/README.rst b/odoo_google_contact_integration/README.rst new file mode 100644 index 000000000..80e464bbd --- /dev/null +++ b/odoo_google_contact_integration/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Google Contact Connector +======================== +* Google Contact Connector module helps to Synchronize Google Contacts. + +Configuration +============= +* No additional configurations needed + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Gion Dany, 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 https://www.cybrosys.com + +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..f644ac3ea --- /dev/null +++ b/odoo_google_contact_integration/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL 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..04a1e00f9 --- /dev/null +++ b/odoo_google_contact_integration/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Google Contact Connector", + 'version': '16.0.1.0.0', + "category": "Extra Tools", + '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.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['contacts'], + 'data': [ + 'views/res_company_views.xml', + 'views/res_partner_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': "LGPL-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..c0e43b9d8 --- /dev/null +++ b/odoo_google_contact_integration/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL 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..56392a34b --- /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) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +import datetime +import requests +from odoo import _ +from odoo import http +from odoo.http import request +from odoo.exceptions import UserError + +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..88a922777 --- /dev/null +++ b/odoo_google_contact_integration/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 21.10.2023 +#### Version 16.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..5315ef499 --- /dev/null +++ b/odoo_google_contact_integration/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL 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..29f7ffa72 --- /dev/null +++ b/odoo_google_contact_integration/models/res_company.py @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import logging +import requests +from odoo import fields, models, _ +from odoo.exceptions import UserError, ValidationError + +_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", + default="http://localhost:8016/google_contact_authentication", + help='People API Authorized redirect URIs') + contact_company_access_token = fields.Char( + string="Access Token", copy=False, + help='People API Access Token') + contact_company_access_token_expiry = fields.Datetime( + string="Token expiry", help='People API Token Expiry') + contact_company_refresh_token = fields.Char( + string="Refresh Token", copy=False, help='People API Refresh Token') + contact_company_authorization_code = fields.Char( + string="Authorization Code", help='People API Authorization Code') + + 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..6fbb8eb43 --- /dev/null +++ b/odoo_google_contact_integration/models/res_partner.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL 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/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/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/logo.png b/odoo_google_contact_integration/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/icons/logo.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/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/categories.png b/odoo_google_contact_integration/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/categories.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/check-box.png b/odoo_google_contact_integration/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/check-box.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/compass.png b/odoo_google_contact_integration/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/compass.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/corporate.png b/odoo_google_contact_integration/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/corporate.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/customer-support.png b/odoo_google_contact_integration/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/customer-support.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/cybrosys-logo.png b/odoo_google_contact_integration/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/features.png b/odoo_google_contact_integration/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/features.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/logo.png b/odoo_google_contact_integration/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/logo.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/pictures.png b/odoo_google_contact_integration/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/pictures.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/pie-chart.png b/odoo_google_contact_integration/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/right-arrow.png b/odoo_google_contact_integration/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/star.png b/odoo_google_contact_integration/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/star.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/support.png b/odoo_google_contact_integration/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/support.png differ diff --git a/odoo_google_contact_integration/static/description/assets/misc/whatsapp.png b/odoo_google_contact_integration/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/biometric_device.png b/odoo_google_contact_integration/static/description/assets/modules/biometric_device.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/biometric_device.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/google_meet_integration.png b/odoo_google_contact_integration/static/description/assets/modules/google_meet_integration.png new file mode 100644 index 000000000..6c3f4e8c3 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/google_meet_integration.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/hr_linkedin.png b/odoo_google_contact_integration/static/description/assets/modules/hr_linkedin.png new file mode 100644 index 000000000..e76acf229 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/hr_linkedin.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/multi_sms.png b/odoo_google_contact_integration/static/description/assets/modules/multi_sms.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/multi_sms.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/product_upcitemdb.png b/odoo_google_contact_integration/static/description/assets/modules/product_upcitemdb.png new file mode 100644 index 000000000..0ec77d677 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/product_upcitemdb.png differ diff --git a/odoo_google_contact_integration/static/description/assets/modules/whatsapp.png b/odoo_google_contact_integration/static/description/assets/modules/whatsapp.png new file mode 100644 index 000000000..eb3f8652f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/modules/whatsapp.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_1.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_1.png new file mode 100644 index 000000000..9c3588cbe Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_1.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_10.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_10.png new file mode 100644 index 000000000..153e21989 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_10.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_11.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_11.png new file mode 100644 index 000000000..ccb326c82 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_11.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_12.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_12.png new file mode 100644 index 000000000..4828b9d4f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_12.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_13.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_13.png new file mode 100644 index 000000000..017329c92 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_13.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_14.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_14.png new file mode 100644 index 000000000..bcaa2b139 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_14.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_15.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_15.png new file mode 100644 index 000000000..bab3718af Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_15.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_16.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_16.png new file mode 100644 index 000000000..64e8c273f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_16.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_17.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_17.png new file mode 100644 index 000000000..427c2fff1 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_17.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_18.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_18.png new file mode 100644 index 000000000..662852b9a Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_18.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_19.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_19.png new file mode 100644 index 000000000..5b51e966d Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_19.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_2.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_2.png new file mode 100644 index 000000000..3ed8cb6ca Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_2.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_20.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_20.png new file mode 100644 index 000000000..42c23b3bd Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_20.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_21.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_21.png new file mode 100644 index 000000000..fea58c9d6 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_21.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_22.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_22.png new file mode 100644 index 000000000..6cfc21508 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_22.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_23.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_23.png new file mode 100644 index 000000000..5b03f3032 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_23.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_3.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_3.png new file mode 100644 index 000000000..16a6685a5 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_3.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_4.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_4.png new file mode 100644 index 000000000..40ce6af19 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_4.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_5.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_5.png new file mode 100644 index 000000000..813a7e80f Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_5.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_6.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_6.png new file mode 100644 index 000000000..505c123e6 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_6.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_7.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_7.png new file mode 100644 index 000000000..ed1f4ddc7 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_7.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_8.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_8.png new file mode 100644 index 000000000..08d97fb09 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_8.png differ diff --git a/odoo_google_contact_integration/static/description/assets/screenshots/gci_9.png b/odoo_google_contact_integration/static/description/assets/screenshots/gci_9.png new file mode 100644 index 000000000..938275588 Binary files /dev/null and b/odoo_google_contact_integration/static/description/assets/screenshots/gci_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..9359f7c34 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.png b/odoo_google_contact_integration/static/description/banner.png new file mode 100644 index 000000000..fa31d0339 Binary files /dev/null and b/odoo_google_contact_integration/static/description/banner.png 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..993917158 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..f083a8612 --- /dev/null +++ b/odoo_google_contact_integration/static/description/index.html @@ -0,0 +1,870 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Google Contact Connector

+

+ A Module For Synchronizing Google Contacts.

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

+ Explore This Module

+
+ + + + + +
+
+ +
+

+ Overview

+
+ +
+
+ The Google Contact Connector module helps you import Google contacts from Odoo and export Google contacts to Odoo. +
+
+ + + +
+
+ +
+

+ Features

+
+ +
+
+
+ + Import Odoo contacts to Google. +
+
+ + Update already created contacts when importing from Google to Odoo. +
+
+ + Delete contact from Odoo and Google. +
+
+
+
+ + Export Google contacts to Odoo. +
+
+ + Update already created contacts when exporting from Google to Odoo. +
+
+ + Filter contact synced with Google. +
+
+
+ + + + +
+
+ +
+

+ Configuration

+
+ +
+
+
+

+ Steps to set up in Google. +

+

+ 1. Sign in with your Google Account. To generate Google Contact API credentials, go to Google API Platform. +
+     (https://console.cloud.google.com/apis/dashboard) +
+     Click Enable APIs and Services. +

+ +
+
+

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

+ +
+
+

+ 3. Select the Google People API and enable it. +

+

+

+ +
+
+

+ 4. Click Create Credentials. +

+ +
+
+

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

+ +
+
+

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

+ +
+
+

+ 7. Skipped the Third Scope. Save and Continue. +

+ +
+
+

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

+ +
+
+

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

+ +
+
+

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

+ +
+
+

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

+ +
+
+

+ 12. Also provide users to access the app. +

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

+ Screenshots

+
+ +
+
+
+
+

+ Odoo Configuration

+
+

+ 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. +

+ +
+
+
+

+ Import Contact

+
+

+ 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. +

+ +
+
+

+ Export Contact

+

+ 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. +

+ +
+
+

+ Delete Contact

+

+ 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. +

+ +
+
+

+ Filter Contact

+

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

+ +
+
+

+ Contacts that synced with Google. +

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

+ Related Products

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

+ Our Services

+
+ +
+
+
+
+ +
+
+ Odoo Customization
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ Odoo Support
+
+
+
+ +
+
+ Hire Odoo Developer
+
+
+
+ +
+
+ Odoo Integration
+
+
+
+ +
+
+ Odoo Migration
+
+
+
+ +
+
+ Odoo Consultancy
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ Odoo Licensing Consultancy
+
+
+
+ + + +
+
+ +
+

+ Our Industries

+
+ +
+
+
+
+ +
+ Trading
+

+ Easily Procure and Sell Your Products

+
+
+
+
+ +
+ POS
+

+ Easy Configuration and Convivial Experience

+
+
+
+
+ +
+ Education
+

+ A Platform for Educational Management

+
+
+
+
+ +
+ Manufacturing
+

+ Plan, Track and Schedule Your Operations

+
+
+
+
+ +
+ E-commerce & Website
+

+ Mobile Friendly, awe-inspiring Product Pages

+
+
+
+
+ +
+ Service Management
+

+ Keep Track of Services and Invoice

+
+
+
+
+ +
+ Restaurant
+

+ Run Your Bar or Restaurant Methodically

+
+
+
+
+ +
+ Hotel Management
+

+ An all-inclusive Hotel Management Application

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

+ Support

+
+ +
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/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 + + + + + + + + + + + + + +