diff --git a/sync_task_with_google_calender/README.rst b/sync_task_with_google_calender/README.rst new file mode 100644 index 000000000..7c1ccf446 --- /dev/null +++ b/sync_task_with_google_calender/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Google Calendar Integration for Project and Task +========================================= +* Sync Project Task with Google Calendar. +* Auto Update Task with Google Calendar. +* Option to Sync Selected Task with Google Calendar. +* Email Notification. + +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 +------- +* Developer: (V16)Jumana Jabin MP, Contact: odoo@cybrosys + +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/sync_task_with_google_calender/__init__.py b/sync_task_with_google_calender/__init__.py new file mode 100644 index 000000000..43cc98def --- /dev/null +++ b/sync_task_with_google_calender/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Jabin MP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/sync_task_with_google_calender/__manifest__.py b/sync_task_with_google_calender/__manifest__.py new file mode 100644 index 000000000..5033292cf --- /dev/null +++ b/sync_task_with_google_calender/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Jabin MP (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 Calendar Integration For Project And Task', + 'version': '16.0.1.0.0', + 'category': 'Project', + 'summary': 'Module For Integrating Odoo Project With Google Calender.', + "description": """Google Calendar Integration for Project Tasks odoo app + helps users to sync project tasks with google Calendar. Users can get all + task information like name, description, create date time, deadline, and + attende, If a user updates a task then google calendar events also get + updated.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'project', 'google_calendar'], + 'data': [ + 'views/res_users_views.xml', + 'views/project_task_views.xml', + ], + 'images': [ + 'static/description/banner.png' + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/sync_task_with_google_calender/doc/RELEASE_NOTES.md b/sync_task_with_google_calender/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..acc9ff6de --- /dev/null +++ b/sync_task_with_google_calender/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.07.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Google Calendar Integration For Project And Task diff --git a/sync_task_with_google_calender/models/__init__.py b/sync_task_with_google_calender/models/__init__.py new file mode 100644 index 000000000..39227b192 --- /dev/null +++ b/sync_task_with_google_calender/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Jumana Jabin MP (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 project_task +from . import res_users diff --git a/sync_task_with_google_calender/models/project_task.py b/sync_task_with_google_calender/models/project_task.py new file mode 100644 index 000000000..42d003726 --- /dev/null +++ b/sync_task_with_google_calender/models/project_task.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Jabin MP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import requests +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class ProjectTask(models.Model): + """ Extend 'project.task' model to add Google Calendar integration.""" + _inherit = 'project.task' + + is_add_in_gcalendar = fields.Boolean(string="Add In G-Calendar Event", + help="Set this field True if you want to" + " add this task to Google Calendar.") + task_event = fields.Char(string="Task Google Calendar Event ID", + help="This field stores the unique ID of Google" + " Calendar event associated with the task.") + task_created = fields.Char(string="Task Creator ID", + help="This field stores the unique ID of the " + "task creator or owner.") + + @api.model + def create(self, vals): + """Override create() method to sync task to Google Calendar if + enabled.""" + task = super().create(vals) + if task.is_add_in_gcalendar: + self.sync_task_to_google_calendar(task) + return task + + def write(self, vals): + """Override write() method to update Google Calendar event if relevant + fields are modified.""" + res = super().write(vals) + if any(field in ['user_id', 'partner_id', 'name', 'description', + 'date_deadline', 'due_date', 'is_add_in_gcalendar'] for + field in vals): + task = self + self.update_google_calendar_event(task) + return res + + def sync_task_to_google_calendar(self, task): + """Sync the task to Google Calendar by creating a new event.""" + if self.is_add_in_gcalendar and ( + not self.partner_id or not self.date_deadline): + required_fields = [] + if not self.partner_id: + required_fields.append(self._fields['partner_id'].string) + if not self.date_deadline: + required_fields.append(self._fields['date_deadline'].string) + raise UserError(_( + f"The following fields are required when 'Add In G-Calendar" + f" Event' is enabled: {', '.join(required_fields)}")) + headers, url = self._prepare_headers_and_url( + self.env.user.google_user_mail) + project_name = task.project_id.name.capitalize() if task.project_id \ + else '' + event = { + 'summary': f"Project: {project_name} - Task: {task.name}", + 'description': task.description, + 'start': {'date': str(task.date_deadline)}, + 'end': { + 'date': str(task.date_deadline)} if task.date_deadline else { + 'date': ''}, + 'extendedProperties': { + 'private': { + 'create_date_time': str(task.create_date), + 'user': task.manager_id.name if task.manager_id else '', + } + }, + 'attendees': [{'email': attendee.email} for attendee in + task.user_ids if attendee.email], + 'reminders': { + 'useDefault': False, + 'overrides': [ + {'method': 'email', 'minutes': 0}, + {'method': 'email', 'minutes': 24 * 60}, + ] + } + } + if task.partner_id and task.partner_id.email: + event['attendees'].append({'email': task.partner_id.email}) + event['reminders']['overrides'].append( + {'method': 'email', 'minutes': 60}) + response = requests.post(url, headers=headers, json=event) + if response.status_code == 200: + event_id = response.json().get('id') + creator_email = response.json().get('creator', {}).get('email') + message = f'Google Calendar Event created\nTask ID: {task.id}\n' \ + f'Event ID: {event_id}\nCreator Email: {creator_email}' + task.message_post(body=message) + task.task_event = event_id + task.task_created = creator_email + else: + message = 'Failed to create event in Google Calendar' + task.message_post(body=message) + + def update_google_calendar_event(self, task): + """Update the Google Calendar event associated with the task.""" + event_id = task.task_event + if not event_id: + self.sync_task_to_google_calendar(task) + return + event = { + 'summary': task.name, + 'description': task.description, + 'start': {'date': str(task.date_deadline)}, + 'end': { + 'date': str(task.date_deadline)} if task.date_deadline else { + 'date': ''}, + 'extendedProperties': { + 'private': { + 'create_date_time': str(task.create_date), + 'user': task.manager_id.name if task.manager_id else '', + } + }, + 'attendees': [{'email': attendee.email} for attendee in + task.user_ids if attendee.email], + } + headers, url = self._prepare_headers_and_url( + self.env.user.google_user_mail, event_id) + response = requests.patch(url, headers=headers, json=event) + if response.status_code == 200: + message = f'Event updated in Google Calendar' + task.message_post(body=message) + else: + message = f'Failed to update event in Google Calendar' + task.message_post(body=message) + + def _prepare_headers_and_url(self, google_calendar_id, event_id=None): + """ + Prepare headers and URL for Google Calendar API requests. + """ + headers = { + "Authorization": f"Bearer {self.env.user.user_token}", + "Content-Type": "application/json", + "Accept": "application/json" + } + api_key = self.env.user.api_key + url = f"https://www.googleapis.com/calendar/v3/calendars/" \ + f"{google_calendar_id}/events" + if event_id: + url += f"/{event_id}" + url += f"?key={api_key}" + return headers, url + + def unlink(self): + """Override unlink method to delete associated Google Calendar + events.""" + self.delete_google_calendar_events() + return super(ProjectTask, self).unlink() + + def delete_google_calendar_events(self): + """Delete associated events from Google Calendar.""" + event_ids = self.mapped('task_event') + if event_ids: + headers = { + "Authorization": f"Bearer {self.env.user.user_token}", + "Content-Type": "application/json", + "Accept": "application/json" + } + for event_id in event_ids: + url = f"https://www.googleapis.com/calendar/v3/calendars/" \ + f"{self.env.user.google_user_mail}/events/{event_id}" \ + f"?key=" \ + f"{self.env.user.api_key}" + # Delete event from Google Calendar + response = requests.delete(url, headers=headers) + return response diff --git a/sync_task_with_google_calender/models/res_users.py b/sync_task_with_google_calender/models/res_users.py new file mode 100644 index 000000000..46f2554d7 --- /dev/null +++ b/sync_task_with_google_calender/models/res_users.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Jumana Jabin MP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import requests +import re +from datetime import timedelta +from odoo import fields, models, _ +from odoo.exceptions import UserError +from odoo.addons.google_account.models.google_service import \ + GOOGLE_TOKEN_ENDPOINT + + +class ResUsers(models.Model): + """Extend res.users model to include Google Calendar integration.""" + + _inherit = 'res.users' + + refresh_token = fields.Char(string='Refresh Token', + help='Refresh token used for token ' + 'authentication with Google Calendar' + ' service.') + user_token = fields.Char(string='User Token', + help='User token or access token obtained from ' + 'Google Calendar service.') + last_sync_date = fields.Datetime(string='Token Validity', + help='Date and time indicating the ' + 'validity' + ' period of the user token.') + api_key = fields.Char(string="Enter API Key", + help='API key required for authentication and access ' + 'to Google Calendar service.') + google_user_mail = fields.Char(string='User Mail', + help='The Mail address where the task is ' + 'to be created') + + def _set_auth_tokens(self, access_token, refresh_token, ttl): + """Set the authentication tokens for the user.""" + self.write({ + 'refresh_token': refresh_token, + 'user_token': access_token, + 'last_sync_date': fields.Datetime.now() + timedelta( + seconds=ttl) if ttl else False, + }) + + def authenticate_button(self): + """Authenticate the user with Google Calendar service.""" + self.ensure_one() + get_param = self.env['ir.config_parameter'].sudo().get_param + client_id = get_param('google_calendar_client_id') + client_secret = get_param('google_calendar_client_secret') + if not client_id or not client_secret: + raise UserError(_("The account for the Google Calendar " + "service is not configured.")) + # Validate the API key and email credentials + if not (self.api_key and len( + self.api_key) > 10 and self.is_valid_email()): + raise UserError(_("Invalid credentials. Please provide valid " + "API key or email.")) + self.refresh_token = self.google_calendar_account_id.calendar_rtoken + self.user_token = self.google_calendar_account_id.calendar_token + self.last_sync_date = self.google_calendar_account_id. \ + calendar_token_validity + notification = { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': _('Successful'), + 'type': 'success', + 'message': 'Authentication successful!', + 'sticky': True, + } + } + return notification + + def is_valid_email(self): + """ Return True if the email is valid, False otherwise""" + pattern = r'^[\w\.-]+@[\w\.-]+\.\w+$' + if self.google_user_mail and re.match(pattern, self.google_user_mail): + return True + return False + + def refresh_button(self): + """Refresh the user token using the refresh token.""" + get_param = self.env['ir.config_parameter'].sudo().get_param + client_id = get_param('google_calendar_client_id') + client_secret = get_param('google_calendar_client_secret') + if not client_id or not client_secret: + raise UserError( + _("The account for the Google Calendar service is" + " not configured.")) + headers = {"content-type": "application/x-www-form-urlencoded"} + data = { + 'refresh_token': self.refresh_token, + 'client_id': client_id, + 'client_secret': client_secret, + 'grant_type': 'refresh_token', + } + try: + _dummy, response, _dummy = self.env['google.service']._do_request( + GOOGLE_TOKEN_ENDPOINT, params=data, + headers=headers, method='POST', preuri='') + ttl = response.get('expires_in') + self.write({ + 'user_token': response.get('access_token'), + 'last_sync_date': fields.Datetime.now() + timedelta( + seconds=ttl), + }) + except requests.HTTPError as error: + if error.response.status_code in ( + 400, 401): # invalid grant or invalid client + # Delete refresh token and make sure it's committed + self.env.cr.rollback() + self._set_auth_tokens(False, False, 0) + self.env.cr.commit() + error_key = error.response.json().get("error", "nc") + error_msg = _( + "An error occurred while generating the token. " + "Your authorization code may be invalid or has already" + " expired [%s].You should check your Client ID and secret on " + "the Google APIs platform try to stop and restart your " + "calendar synchronization.", + error_key) + raise UserError(error_msg) diff --git a/sync_task_with_google_calender/static/description/assets/icons/check.png b/sync_task_with_google_calender/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/check.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/chevron.png b/sync_task_with_google_calender/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/chevron.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/cogs.png b/sync_task_with_google_calender/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/cogs.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/consultation.png b/sync_task_with_google_calender/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/consultation.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/ecom-black.png b/sync_task_with_google_calender/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/ecom-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/education-black.png b/sync_task_with_google_calender/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/education-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/hotel-black.png b/sync_task_with_google_calender/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/hotel-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/license.png b/sync_task_with_google_calender/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/license.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/lifebuoy.png b/sync_task_with_google_calender/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/lifebuoy.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/manufacturing-black.png b/sync_task_with_google_calender/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/manufacturing-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/pos-black.png b/sync_task_with_google_calender/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/pos-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/puzzle.png b/sync_task_with_google_calender/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/puzzle.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/restaurant-black.png b/sync_task_with_google_calender/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/restaurant-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/service-black.png b/sync_task_with_google_calender/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/service-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/trading-black.png b/sync_task_with_google_calender/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/trading-black.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/training.png b/sync_task_with_google_calender/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/training.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/update.png b/sync_task_with_google_calender/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/update.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/user.png b/sync_task_with_google_calender/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/user.png differ diff --git a/sync_task_with_google_calender/static/description/assets/icons/wrench.png b/sync_task_with_google_calender/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/icons/wrench.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/categories.png b/sync_task_with_google_calender/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/categories.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/check-box.png b/sync_task_with_google_calender/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/check-box.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/compass.png b/sync_task_with_google_calender/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/compass.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/corporate.png b/sync_task_with_google_calender/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/corporate.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/customer-support.png b/sync_task_with_google_calender/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/customer-support.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/cybrosys-logo.png b/sync_task_with_google_calender/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/cybrosys-logo.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/features.png b/sync_task_with_google_calender/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/features.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/logo.png b/sync_task_with_google_calender/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/logo.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/pictures.png b/sync_task_with_google_calender/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/pictures.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/pie-chart.png b/sync_task_with_google_calender/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/pie-chart.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/right-arrow.png b/sync_task_with_google_calender/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/right-arrow.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/star.png b/sync_task_with_google_calender/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/star.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/support.png b/sync_task_with_google_calender/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/support.png differ diff --git a/sync_task_with_google_calender/static/description/assets/misc/whatsapp.png b/sync_task_with_google_calender/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/misc/whatsapp.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/11.png b/sync_task_with_google_calender/static/description/assets/modules/11.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/11.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/12.png b/sync_task_with_google_calender/static/description/assets/modules/12.png new file mode 100644 index 000000000..6c3f4e8c3 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/12.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/13.png b/sync_task_with_google_calender/static/description/assets/modules/13.png new file mode 100644 index 000000000..e76acf229 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/13.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/14.png b/sync_task_with_google_calender/static/description/assets/modules/14.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/14.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/15.png b/sync_task_with_google_calender/static/description/assets/modules/15.png new file mode 100644 index 000000000..023f7926e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/15.png differ diff --git a/sync_task_with_google_calender/static/description/assets/modules/16.png b/sync_task_with_google_calender/static/description/assets/modules/16.png new file mode 100644 index 000000000..1c98e213f Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/modules/16.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/1.png b/sync_task_with_google_calender/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..8262d921e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/1.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/10.png b/sync_task_with_google_calender/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..7fffa0ce4 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/10.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/11.png b/sync_task_with_google_calender/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..0084135d2 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/11.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/12.png b/sync_task_with_google_calender/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..d62c8ab0c Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/12.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/13.png b/sync_task_with_google_calender/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..374c78c38 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/13.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/14.png b/sync_task_with_google_calender/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..957323438 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/14.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/2.png b/sync_task_with_google_calender/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..f151e5e76 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/2.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/3.png b/sync_task_with_google_calender/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..65c51d557 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/3.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/4.png b/sync_task_with_google_calender/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..9ae10222e Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/4.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/5.png b/sync_task_with_google_calender/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..7c8cf9544 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/5.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/6.png b/sync_task_with_google_calender/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..8da664335 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/6.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/7.png b/sync_task_with_google_calender/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..8a17acc92 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/7.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/8.png b/sync_task_with_google_calender/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..d3fad6227 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/8.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/9.png b/sync_task_with_google_calender/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..54acecb71 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/9.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a1.png b/sync_task_with_google_calender/static/description/assets/screenshots/a1.png new file mode 100644 index 000000000..1991e013c Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a1.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a2.png b/sync_task_with_google_calender/static/description/assets/screenshots/a2.png new file mode 100644 index 000000000..df4c54d4b Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a2.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a3.png b/sync_task_with_google_calender/static/description/assets/screenshots/a3.png new file mode 100644 index 000000000..cfdd18ff8 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a3.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a4.png b/sync_task_with_google_calender/static/description/assets/screenshots/a4.png new file mode 100644 index 000000000..e87da0731 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a4.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a5.png b/sync_task_with_google_calender/static/description/assets/screenshots/a5.png new file mode 100644 index 000000000..4c3e01e86 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a5.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a6.png b/sync_task_with_google_calender/static/description/assets/screenshots/a6.png new file mode 100644 index 000000000..7149b6472 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a6.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a7.png b/sync_task_with_google_calender/static/description/assets/screenshots/a7.png new file mode 100644 index 000000000..ee4bac831 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a7.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/a8.png b/sync_task_with_google_calender/static/description/assets/screenshots/a8.png new file mode 100644 index 000000000..04613cff2 Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/a8.png differ diff --git a/sync_task_with_google_calender/static/description/assets/screenshots/hero.gif b/sync_task_with_google_calender/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..44f9bd4bf Binary files /dev/null and b/sync_task_with_google_calender/static/description/assets/screenshots/hero.gif differ diff --git a/sync_task_with_google_calender/static/description/banner.png b/sync_task_with_google_calender/static/description/banner.png new file mode 100644 index 000000000..52803146a Binary files /dev/null and b/sync_task_with_google_calender/static/description/banner.png differ diff --git a/sync_task_with_google_calender/static/description/icon.png b/sync_task_with_google_calender/static/description/icon.png new file mode 100644 index 000000000..80c3bfdef Binary files /dev/null and b/sync_task_with_google_calender/static/description/icon.png differ diff --git a/sync_task_with_google_calender/static/description/index.html b/sync_task_with_google_calender/static/description/index.html new file mode 100644 index 000000000..e01d6dcd2 --- /dev/null +++ b/sync_task_with_google_calender/static/description/index.html @@ -0,0 +1,804 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.Sh +
+
+
+ + +
+
+
+

+ Google Calendar Integration for Project and Task

+

+ Google Calendar Synchronization With Project and Tasks Odoo Apps +

+ +
+
+ + +
+
+

+ Overview +

+
+ +
+

+ Google Calendar Integration for Project and Tasks odoo app helps users to sync project tasks with Google + calendar. Users have the option to sync tasks with Google or not and on creating tasks user and customer + both will get notified by email. Users can get all task information like name, description, create date + time, deadline, and attendees, If a user updates a task then google calendar events also get updated. + If a user deletes a task then google calendar events also get deleted. +

+
+
+ +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Sync Project Task with Google Calendar

+
+
+ +
+
+ +
+
+

+ Auto Update Task with Google Calendar

+
+
+ +
+
+ +
+
+

+ Auto Delete Task with Google Calendar

+
+
+
+
+ +
+
+

+ Email Notification +

+
+
+
+ +
+
+

+ Screenshots +

+
+
+

+ Google Calendar Client Credential and API Configuration +

+

+ User have to create a new project from Google cloud platform

+ +

+ add a project name and click on "create" button

+ +

+ User have to navigate to "Google API Console" and click on "ENABLE APIS AND SERVICES". +

+ +
+ +
+

+ Enable Google Calendar API +

+

+ Search for "Google Calendar API", Open and click "Enable" to use. + +

+ +
+ +
+

+ Create Credentials for Google Calendar API

+

+ Navigate to "Credentials" menu and click "Create Credentials" button on header. + +

+ +

+ Select "Google Calendar API" as api and "User Data" as data accessing and click "Next" +

+ +

+ Select "Web Application" as application type and enter name, Click "Add URL" under "Authorized redirect + URIs" and enter your url. + +

+

+ Authorized redirect URl is "http://localhost:8030".User need to change "http://localhost:8030" by + his/her odoo instance. + +

+ + +
+
+

+ Google Calendar API Credential + +

+

+ On clicking "Create" button user will get "Client ID" and "Client secret" key for Google calendar api. + + +

+ +
+ +
+

+ User Authentication + + +

+

+ Under Settings > integration > google calender, add client id and client secret then save . + + +

+ +

+ Under Settings > Users and Companies > Users menu under "Sync of Project Task" tab user need to click + "AUTHENTICATE" button. + + +

+ +

+ if the user don't sync with Google calender then, warning will shown +

+ +

+ Then goto Calendar module and confirm the synchronization +

+ +

+ On successful authentication user will get message shown below image. + +

+

+ On successful authentication user can see all details are updated from api like + "Refresh Token", "User token", "Token Validity", and enter "api key".

+ +
+
+

+ Sync Project Task to Google Calendar +

+

+ While creating project task user have to enable "Add In G-Calendar Event" and enter other task + information like name, customer, task due date, deadline, end date and description +

+ +

+ User can see task with "Add In G-Calendar Event" is automatically linked to google calendar. Also, can + see + in chatter its status + +

+ +

+ On clicking google calendar event user can also see all task details like project and task name, create + date and time, attendee, description, and user. + +

+ +

+ User can see google calendar event is also link with project task. + +

+ +

+ On task creating task customer and user both will notify by email. + + +

+ + +
+
+

+ Update Project Task +

+

+ On updating project task like user, customer, name, description, deadline, due date etc., google + calendar + event also changed. also can see in chatter its status +

+ +

+ User can see updated google calendar event as per task. + + +

+ +

+ If user delete project task, then google calender also get deleted. + +

+ +

+ User can see deleted google calendar event on delete of project task. + + +

+ +
+ +
+ +
+
+ +
+

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/sync_task_with_google_calender/views/project_task_views.xml b/sync_task_with_google_calender/views/project_task_views.xml new file mode 100644 index 000000000..7e630c244 --- /dev/null +++ b/sync_task_with_google_calender/views/project_task_views.xml @@ -0,0 +1,28 @@ + + + + + + project.task.view.form.inherit.sync.task.with.google.calender + + project.task + + + + + + + + + + + + + + + + + + diff --git a/sync_task_with_google_calender/views/res_users_views.xml b/sync_task_with_google_calender/views/res_users_views.xml new file mode 100644 index 000000000..2d8ffaa10 --- /dev/null +++ b/sync_task_with_google_calender/views/res_users_views.xml @@ -0,0 +1,37 @@ + + + + + + res.users.view.form.inherit.sync.task.with.google.calender + + res.users + + + + + + + + + + + + + + + +