@ -0,0 +1,43 @@ |
|||
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg |
|||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
:alt: License: LGPL-3 |
|||
|
|||
Todoist Integration |
|||
=================== |
|||
This module enables the integration of Todoist and Odoo. |
|||
|
|||
Configuration |
|||
============= |
|||
- Create a todoist token from todoist account and sync the data with odoo. |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (V17) Nivedhya T, |
|||
(V16) Sayanth M K, |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import models |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': "Todoist Integration", |
|||
'version': '17.0.1.0.0', |
|||
'category': 'Project', |
|||
'summary': """This module enables the integration of Todoist and Odoo.""", |
|||
'description': """This module enables the integration of Todoist and Odoo. |
|||
Projects and tasks from Todoist to Odoo will be managed in this way.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['project'], |
|||
'data': [ |
|||
'views/res_users_views.xml', |
|||
], |
|||
'external_dependencies': { |
|||
'python': ['todoist-python'], |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,7 @@ |
|||
## Module <todoist_project> |
|||
|
|||
#### 18.06.2025 |
|||
#### Version 17.0.1.0.0 |
|||
##### ADD |
|||
|
|||
- Initial commit for Todoist Integration |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import project_project |
|||
from . import project_task |
|||
from . import res_users |
@ -0,0 +1,31 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProjectProject(models.Model): |
|||
"""Extends project_project model to add a todo_project field.""" |
|||
_inherit = 'project.project' |
|||
|
|||
todo_project = fields.Char(string='Todo Project', |
|||
help='Description or additional information ' |
|||
'about the Todo Project') |
@ -0,0 +1,31 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProjectTask(models.Model): |
|||
"""Extends project_task model to add a todo_task field.""" |
|||
_inherit = 'project.task' |
|||
|
|||
todo_task = fields.Char(string='Todo Task', |
|||
help='Description or additional information about' |
|||
' the Todo Task') |
@ -0,0 +1,105 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys (<https://www.cybrosys.com>) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from .todoist_api_python.api import TodoistAPI |
|||
from odoo import fields, models, _ |
|||
from odoo.exceptions import MissingError |
|||
|
|||
|
|||
def _get_todoist_projects_tasks(token, project=False): |
|||
"""Fetch Projects and Tasks from API""" |
|||
try: |
|||
return TodoistAPI( |
|||
token).get_projects() if project else TodoistAPI(token).get_tasks() |
|||
except Exception as error: |
|||
return error |
|||
|
|||
|
|||
class ResUsers(models.Model): |
|||
"""Extends res_users model to integrate Todoist functionality.""" |
|||
_inherit = 'res.users' |
|||
|
|||
todoist_token = fields.Char(string='Todoist Token', |
|||
help='todoist auth token to retrieve data' |
|||
' from todoist', |
|||
copy=False) |
|||
|
|||
def _fetch_token(self): |
|||
"""Method to fetch a token from user""" |
|||
if self.todoist_token: |
|||
return self.todoist_token |
|||
raise MissingError('Token not found!') |
|||
|
|||
def _add_all_projects(self): |
|||
"""Add all projects or Write projects with updated data from API""" |
|||
for project in _get_todoist_projects_tasks(self._fetch_token(), |
|||
project=True): |
|||
vals = {'todo_project': str(project.id), 'name': project.name} |
|||
exist = self.env['project.project'].sudo().search( |
|||
[('todo_project', '=', vals['todo_project'])], |
|||
limit=1) |
|||
exist.write(vals) if exist else self.env[ |
|||
'project.project'].sudo().create(vals) |
|||
|
|||
def _add_task_tags(self, tags): |
|||
"""Add all tags or Write tags with updated data from API""" |
|||
TagModel = self.env['project.tags'] |
|||
existing_tags = {tag.name: tag for tag in |
|||
TagModel.sudo().search([('name', 'in', tags)])} |
|||
created_tags = TagModel.sudo().create( |
|||
[{'name': tag} for tag in tags if tag not in existing_tags]) |
|||
existing_tags.update({tag.name: tag for tag in created_tags}) |
|||
return [existing_tags[tag].id for tag in tags] |
|||
|
|||
def _add_all_tasks(self): |
|||
"""Add all tasks or Write tasks with updated data from API""" |
|||
ProjectModel = self.env['project.project'] |
|||
TaskModel = self.env['project.task'] |
|||
for task in _get_todoist_projects_tasks(self._fetch_token(), |
|||
project=False): |
|||
task_vals = { |
|||
'project_id': ProjectModel.sudo().search( |
|||
[('todo_project', '=', str(task.project_id))], limit=1).id, |
|||
'name': task.content, |
|||
'todo_task': str(task.id), |
|||
'date_deadline': task.due.date if task.due else False, |
|||
'tag_ids': [(6, 0, self._add_task_tags(task.labels))], |
|||
'description': task.description if task.description else False, |
|||
} |
|||
existing_task = TaskModel.sudo().search( |
|||
[('todo_task', '=', task_vals['todo_task'])], limit=1) |
|||
existing_task.write( |
|||
task_vals) if existing_task else TaskModel.sudo().create( |
|||
task_vals) |
|||
|
|||
def action_sync_todoist_with_odoo(self): |
|||
"""Sync the Todoist with odoo""" |
|||
self._add_all_projects() |
|||
self._add_all_tasks() |
|||
return { |
|||
'type': 'ir.actions.client', |
|||
'tag': 'display_notification', |
|||
'params': { |
|||
'type': 'success', |
|||
'message': (_("Successfully Synchronized Data!")), |
|||
'next': {'type': 'ir.actions.act_window_close'}, |
|||
} |
|||
} |
@ -0,0 +1,209 @@ |
|||
from __future__ import annotations |
|||
|
|||
from typing import Any, Dict, List |
|||
|
|||
import requests |
|||
|
|||
from ..todoist_api_python.endpoints import ( |
|||
COLLABORATORS_ENDPOINT, |
|||
COMMENTS_ENDPOINT, |
|||
LABELS_ENDPOINT, |
|||
PROJECTS_ENDPOINT, |
|||
QUICK_ADD_ENDPOINT, |
|||
SECTIONS_ENDPOINT, |
|||
SHARED_LABELS_ENDPOINT, |
|||
SHARED_LABELS_REMOVE_ENDPOINT, |
|||
SHARED_LABELS_RENAME_ENDPOINT, |
|||
TASKS_ENDPOINT, |
|||
get_rest_url, |
|||
get_sync_url, |
|||
) |
|||
from ..todoist_api_python.http_requests import delete, get, post |
|||
from ..todoist_api_python.models import ( |
|||
Collaborator, |
|||
Comment, |
|||
Label, |
|||
Project, |
|||
QuickAddResult, |
|||
Section, |
|||
Task, |
|||
) |
|||
|
|||
|
|||
class TodoistAPI: |
|||
def __init__(self, token: str, session: requests.Session | None = None) -> None: |
|||
self._token: str = token |
|||
self._session = session or requests.Session() |
|||
|
|||
def get_task(self, task_id: str) -> Task: |
|||
endpoint = get_rest_url(f"{TASKS_ENDPOINT}/{task_id}") |
|||
task = get(self._session, endpoint, self._token) |
|||
return Task.from_dict(task) |
|||
|
|||
def get_tasks(self, **kwargs) -> List[Task]: |
|||
ids = kwargs.pop("ids", None) |
|||
|
|||
if ids: |
|||
kwargs.update({"ids": ",".join(str(i) for i in ids)}) |
|||
|
|||
endpoint = get_rest_url(TASKS_ENDPOINT) |
|||
tasks = get(self._session, endpoint, self._token, kwargs) |
|||
return [Task.from_dict(obj) for obj in tasks] |
|||
|
|||
def add_task(self, content: str, **kwargs) -> Task: |
|||
endpoint = get_rest_url(TASKS_ENDPOINT) |
|||
data: Dict[str, Any] = {"content": content} |
|||
data.update(kwargs) |
|||
task = post(self._session, endpoint, self._token, data=data) |
|||
return Task.from_dict(task) |
|||
|
|||
def update_task(self, task_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{TASKS_ENDPOINT}/{task_id}") |
|||
return post(self._session, endpoint, self._token, data=kwargs) |
|||
|
|||
def close_task(self, task_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{TASKS_ENDPOINT}/{task_id}/close") |
|||
return post(self._session, endpoint, self._token, data=kwargs) |
|||
|
|||
def reopen_task(self, task_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{TASKS_ENDPOINT}/{task_id}/reopen") |
|||
return post(self._session, endpoint, self._token, data=kwargs) |
|||
|
|||
def delete_task(self, task_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{TASKS_ENDPOINT}/{task_id}") |
|||
return delete(self._session, endpoint, self._token, args=kwargs) |
|||
|
|||
def quick_add_task(self, text: str) -> QuickAddResult: |
|||
endpoint = get_sync_url(QUICK_ADD_ENDPOINT) |
|||
data = { |
|||
"text": text, |
|||
"meta": True, |
|||
"auto_reminder": True, |
|||
} |
|||
task_data = post(self._session, endpoint, self._token, data=data) |
|||
return QuickAddResult.from_quick_add_response(task_data) |
|||
|
|||
def get_project(self, project_id: str) -> Project: |
|||
endpoint = get_rest_url(f"{PROJECTS_ENDPOINT}/{project_id}") |
|||
project = get(self._session, endpoint, self._token) |
|||
return Project.from_dict(project) |
|||
|
|||
def get_projects(self) -> List[Project]: |
|||
endpoint = get_rest_url(PROJECTS_ENDPOINT) |
|||
projects = get(self._session, endpoint, self._token) |
|||
return [Project.from_dict(obj) for obj in projects] |
|||
|
|||
def add_project(self, name: str, **kwargs) -> Project: |
|||
endpoint = get_rest_url(PROJECTS_ENDPOINT) |
|||
data: Dict[str, Any] = {"name": name} |
|||
data.update(kwargs) |
|||
project = post(self._session, endpoint, self._token, data=data) |
|||
return Project.from_dict(project) |
|||
|
|||
def update_project(self, project_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{PROJECTS_ENDPOINT}/{project_id}") |
|||
return post(self._session, endpoint, self._token, data=kwargs) |
|||
|
|||
def delete_project(self, project_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{PROJECTS_ENDPOINT}/{project_id}") |
|||
return delete(self._session, endpoint, self._token, args=kwargs) |
|||
|
|||
def get_collaborators(self, project_id: str) -> List[Collaborator]: |
|||
endpoint = get_rest_url( |
|||
f"{PROJECTS_ENDPOINT}/{project_id}/{COLLABORATORS_ENDPOINT}" |
|||
) |
|||
collaborators = get(self._session, endpoint, self._token) |
|||
return [Collaborator.from_dict(obj) for obj in collaborators] |
|||
|
|||
def get_section(self, section_id: str) -> Section: |
|||
endpoint = get_rest_url(f"{SECTIONS_ENDPOINT}/{section_id}") |
|||
section = get(self._session, endpoint, self._token) |
|||
return Section.from_dict(section) |
|||
|
|||
def get_sections(self, **kwargs) -> List[Section]: |
|||
endpoint = get_rest_url(SECTIONS_ENDPOINT) |
|||
sections = get(self._session, endpoint, self._token, kwargs) |
|||
return [Section.from_dict(obj) for obj in sections] |
|||
|
|||
def add_section(self, name: str, project_id: str, **kwargs) -> Section: |
|||
endpoint = get_rest_url(SECTIONS_ENDPOINT) |
|||
data = {"name": name, "project_id": project_id} |
|||
data.update(kwargs) |
|||
section = post(self._session, endpoint, self._token, data=data) |
|||
return Section.from_dict(section) |
|||
|
|||
def update_section(self, section_id: str, name: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{SECTIONS_ENDPOINT}/{section_id}") |
|||
data: Dict[str, Any] = {"name": name} |
|||
data.update(kwargs) |
|||
return post(self._session, endpoint, self._token, data=data) |
|||
|
|||
def delete_section(self, section_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{SECTIONS_ENDPOINT}/{section_id}") |
|||
return delete(self._session, endpoint, self._token, args=kwargs) |
|||
|
|||
def get_comment(self, comment_id: str) -> Comment: |
|||
endpoint = get_rest_url(f"{COMMENTS_ENDPOINT}/{comment_id}") |
|||
comment = get(self._session, endpoint, self._token) |
|||
return Comment.from_dict(comment) |
|||
|
|||
def get_comments(self, **kwargs) -> List[Comment]: |
|||
endpoint = get_rest_url(COMMENTS_ENDPOINT) |
|||
comments = get(self._session, endpoint, self._token, kwargs) |
|||
return [Comment.from_dict(obj) for obj in comments] |
|||
|
|||
def add_comment(self, content: str, **kwargs) -> Comment: |
|||
endpoint = get_rest_url(COMMENTS_ENDPOINT) |
|||
data = {"content": content} |
|||
data.update(kwargs) |
|||
comment = post(self._session, endpoint, self._token, data=data) |
|||
return Comment.from_dict(comment) |
|||
|
|||
def update_comment(self, comment_id: str, content: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{COMMENTS_ENDPOINT}/{comment_id}") |
|||
data: Dict[str, Any] = {"content": content} |
|||
data.update(kwargs) |
|||
return post(self._session, endpoint, self._token, data=data) |
|||
|
|||
def delete_comment(self, comment_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{COMMENTS_ENDPOINT}/{comment_id}") |
|||
return delete(self._session, endpoint, self._token, args=kwargs) |
|||
|
|||
def get_label(self, label_id: str) -> Label: |
|||
endpoint = get_rest_url(f"{LABELS_ENDPOINT}/{label_id}") |
|||
label = get(self._session, endpoint, self._token) |
|||
return Label.from_dict(label) |
|||
|
|||
def get_labels(self) -> List[Label]: |
|||
endpoint = get_rest_url(LABELS_ENDPOINT) |
|||
labels = get(self._session, endpoint, self._token) |
|||
return [Label.from_dict(obj) for obj in labels] |
|||
|
|||
def add_label(self, name: str, **kwargs) -> Label: |
|||
endpoint = get_rest_url(LABELS_ENDPOINT) |
|||
data = {"name": name} |
|||
data.update(kwargs) |
|||
label = post(self._session, endpoint, self._token, data=data) |
|||
return Label.from_dict(label) |
|||
|
|||
def update_label(self, label_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{LABELS_ENDPOINT}/{label_id}") |
|||
return post(self._session, endpoint, self._token, data=kwargs) |
|||
|
|||
def delete_label(self, label_id: str, **kwargs) -> bool: |
|||
endpoint = get_rest_url(f"{LABELS_ENDPOINT}/{label_id}") |
|||
return delete(self._session, endpoint, self._token, args=kwargs) |
|||
|
|||
def get_shared_labels(self) -> List[str]: |
|||
endpoint = get_rest_url(SHARED_LABELS_ENDPOINT) |
|||
return get(self._session, endpoint, self._token) |
|||
|
|||
def rename_shared_label(self, name: str, new_name: str) -> bool: |
|||
endpoint = get_rest_url(SHARED_LABELS_RENAME_ENDPOINT) |
|||
data = {"name": name, "new_name": new_name} |
|||
return post(self._session, endpoint, self._token, data=data) |
|||
|
|||
def remove_shared_label(self, name: str) -> bool: |
|||
endpoint = get_rest_url(SHARED_LABELS_REMOVE_ENDPOINT) |
|||
data = {"name": name} |
|||
return post(self._session, endpoint, self._token, data=data) |
@ -0,0 +1,122 @@ |
|||
from __future__ import annotations |
|||
|
|||
from typing import List |
|||
|
|||
from ..todoist_api_python.api import TodoistAPI |
|||
from ..todoist_api_python.models import ( |
|||
Collaborator, |
|||
Comment, |
|||
Label, |
|||
Project, |
|||
QuickAddResult, |
|||
Section, |
|||
Task, |
|||
) |
|||
from ..todoist_api_python.utils import run_async |
|||
|
|||
|
|||
class TodoistAPIAsync: |
|||
def __init__(self, token: str) -> None: |
|||
self._api = TodoistAPI(token) |
|||
|
|||
async def get_task(self, task_id: str) -> Task: |
|||
return await run_async(lambda: self._api.get_task(task_id)) |
|||
|
|||
async def get_tasks(self, **kwargs) -> List[Task]: |
|||
return await run_async(lambda: self._api.get_tasks(**kwargs)) |
|||
|
|||
async def add_task(self, content: str, **kwargs) -> Task: |
|||
return await run_async(lambda: self._api.add_task(content, **kwargs)) |
|||
|
|||
async def update_task(self, task_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.update_task(task_id, **kwargs)) |
|||
|
|||
async def close_task(self, task_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.close_task(task_id, **kwargs)) |
|||
|
|||
async def reopen_task(self, task_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.reopen_task(task_id, **kwargs)) |
|||
|
|||
async def delete_task(self, task_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.delete_task(task_id, **kwargs)) |
|||
|
|||
async def quick_add_task(self, text: str) -> QuickAddResult: |
|||
return await run_async(lambda: self._api.quick_add_task(text)) |
|||
|
|||
async def get_project(self, project_id: str) -> Project: |
|||
return await run_async(lambda: self._api.get_project(project_id)) |
|||
|
|||
async def get_projects(self) -> List[Project]: |
|||
return await run_async(lambda: self._api.get_projects()) |
|||
|
|||
async def add_project(self, name: str, **kwargs) -> Project: |
|||
return await run_async(lambda: self._api.add_project(name, **kwargs)) |
|||
|
|||
async def update_project(self, project_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.update_project(project_id, **kwargs)) |
|||
|
|||
async def delete_project(self, project_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.delete_project(project_id, **kwargs)) |
|||
|
|||
async def get_collaborators(self, project_id: str) -> List[Collaborator]: |
|||
return await run_async(lambda: self._api.get_collaborators(project_id)) |
|||
|
|||
async def get_section(self, section_id: str) -> Section: |
|||
return await run_async(lambda: self._api.get_section(section_id)) |
|||
|
|||
async def get_sections(self, **kwargs) -> List[Section]: |
|||
return await run_async(lambda: self._api.get_sections(**kwargs)) |
|||
|
|||
async def add_section(self, name: str, project_id: str, **kwargs) -> Section: |
|||
return await run_async( |
|||
lambda: self._api.add_section(name, project_id, **kwargs) |
|||
) |
|||
|
|||
async def update_section(self, section_id: str, name: str, **kwargs) -> bool: |
|||
return await run_async( |
|||
lambda: self._api.update_section(section_id, name, **kwargs) |
|||
) |
|||
|
|||
async def delete_section(self, section_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.delete_section(section_id, **kwargs)) |
|||
|
|||
async def get_comment(self, comment_id: str) -> Comment: |
|||
return await run_async(lambda: self._api.get_comment(comment_id)) |
|||
|
|||
async def get_comments(self, **kwargs) -> List[Comment]: |
|||
return await run_async(lambda: self._api.get_comments(**kwargs)) |
|||
|
|||
async def add_comment(self, content: str, **kwargs) -> Comment: |
|||
return await run_async(lambda: self._api.add_comment(content, **kwargs)) |
|||
|
|||
async def update_comment(self, comment_id: str, content: str, **kwargs) -> bool: |
|||
return await run_async( |
|||
lambda: self._api.update_comment(comment_id, content, **kwargs) |
|||
) |
|||
|
|||
async def delete_comment(self, comment_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.delete_comment(comment_id, **kwargs)) |
|||
|
|||
async def get_label(self, label_id: str) -> Label: |
|||
return await run_async(lambda: self._api.get_label(label_id)) |
|||
|
|||
async def get_labels(self) -> List[Label]: |
|||
return await run_async(lambda: self._api.get_labels()) |
|||
|
|||
async def add_label(self, name: str, **kwargs) -> Label: |
|||
return await run_async(lambda: self._api.add_label(name, **kwargs)) |
|||
|
|||
async def update_label(self, label_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.update_label(label_id, **kwargs)) |
|||
|
|||
async def delete_label(self, label_id: str, **kwargs) -> bool: |
|||
return await run_async(lambda: self._api.delete_label(label_id, **kwargs)) |
|||
|
|||
async def get_shared_labels(self) -> List[str]: |
|||
return await run_async(lambda: self._api.get_shared_labels()) |
|||
|
|||
async def rename_shared_label(self, name: str, new_name: str) -> bool: |
|||
return await run_async(lambda: self._api.rename_shared_label(name, new_name)) |
|||
|
|||
async def remove_shared_label(self, name: str) -> bool: |
|||
return await run_async(lambda: self._api.remove_shared_label(name)) |
@ -0,0 +1,67 @@ |
|||
from __future__ import annotations |
|||
|
|||
from typing import List |
|||
from urllib.parse import urlencode |
|||
|
|||
import requests |
|||
from requests import Session |
|||
|
|||
from ..todoist_api_python.endpoints import ( |
|||
AUTHORIZE_ENDPOINT, |
|||
REVOKE_TOKEN_ENDPOINT, |
|||
TOKEN_ENDPOINT, |
|||
get_auth_url, |
|||
get_sync_url, |
|||
) |
|||
from ..todoist_api_python.http_requests import post |
|||
from ..todoist_api_python.models import AuthResult |
|||
from ..todoist_api_python.utils import run_async |
|||
|
|||
|
|||
def get_auth_token( |
|||
client_id: str, client_secret: str, code: str, session: Session | None = None |
|||
) -> AuthResult: |
|||
endpoint = get_auth_url(TOKEN_ENDPOINT) |
|||
session = session or requests.Session() |
|||
payload = {"client_id": client_id, "client_secret": client_secret, "code": code} |
|||
response = post(session=session, url=endpoint, data=payload) |
|||
|
|||
return AuthResult.from_dict(response) |
|||
|
|||
|
|||
async def get_auth_token_async( |
|||
client_id: str, client_secret: str, code: str |
|||
) -> AuthResult: |
|||
return await run_async(lambda: get_auth_token(client_id, client_secret, code)) |
|||
|
|||
|
|||
def revoke_auth_token( |
|||
client_id: str, client_secret: str, token: str, session: Session | None = None |
|||
) -> bool: |
|||
endpoint = get_sync_url(REVOKE_TOKEN_ENDPOINT) |
|||
session = session or requests.Session() |
|||
payload = { |
|||
"client_id": client_id, |
|||
"client_secret": client_secret, |
|||
"access_token": token, |
|||
} |
|||
response = post(session=session, url=endpoint, data=payload) |
|||
|
|||
return response |
|||
|
|||
|
|||
async def revoke_auth_token_async( |
|||
client_id: str, client_secret: str, token: str |
|||
) -> bool: |
|||
return await run_async(lambda: revoke_auth_token(client_id, client_secret, token)) |
|||
|
|||
|
|||
def get_authentication_url(client_id: str, scopes: List[str], state: str) -> str: |
|||
if len(scopes) == 0: |
|||
raise Exception("At least one authorization scope should be requested.") |
|||
|
|||
query = {"client_id": client_id, "scope": ",".join(scopes), "state": state} |
|||
|
|||
auth_url = get_auth_url(AUTHORIZE_ENDPOINT) |
|||
|
|||
return f"{auth_url}?{urlencode(query)}" |
@ -0,0 +1,37 @@ |
|||
from urllib.parse import urljoin |
|||
|
|||
BASE_URL = "https://api.todoist.com" |
|||
AUTH_BASE_URL = "https://todoist.com" |
|||
SYNC_VERSION = "v9" |
|||
REST_VERSION = "v2" |
|||
|
|||
SYNC_API = urljoin(BASE_URL, f"/sync/{SYNC_VERSION}/") |
|||
REST_API = urljoin(BASE_URL, f"/rest/{REST_VERSION}/") |
|||
|
|||
|
|||
TASKS_ENDPOINT = "tasks" |
|||
PROJECTS_ENDPOINT = "projects" |
|||
COLLABORATORS_ENDPOINT = "collaborators" |
|||
SECTIONS_ENDPOINT = "sections" |
|||
COMMENTS_ENDPOINT = "comments" |
|||
LABELS_ENDPOINT = "labels" |
|||
SHARED_LABELS_ENDPOINT = "labels/shared" |
|||
SHARED_LABELS_RENAME_ENDPOINT = f"{SHARED_LABELS_ENDPOINT}/rename" |
|||
SHARED_LABELS_REMOVE_ENDPOINT = f"{SHARED_LABELS_ENDPOINT}/remove" |
|||
QUICK_ADD_ENDPOINT = "quick/add" |
|||
|
|||
AUTHORIZE_ENDPOINT = "oauth/authorize" |
|||
TOKEN_ENDPOINT = "oauth/access_token" |
|||
REVOKE_TOKEN_ENDPOINT = "access_tokens/revoke" |
|||
|
|||
|
|||
def get_rest_url(relative_path: str) -> str: |
|||
return urljoin(REST_API, relative_path) |
|||
|
|||
|
|||
def get_sync_url(relative_path: str) -> str: |
|||
return urljoin(SYNC_API, relative_path) |
|||
|
|||
|
|||
def get_auth_url(relative_path: str) -> str: |
|||
return urljoin(AUTH_BASE_URL, relative_path) |
@ -0,0 +1,24 @@ |
|||
from __future__ import annotations |
|||
|
|||
from typing import Dict |
|||
|
|||
CONTENT_TYPE = ("Content-Type", "application/json; charset=utf-8") |
|||
AUTHORIZATION = ("Authorization", "Bearer %s") |
|||
X_REQUEST_ID = ("X-Request-Id", "%s") |
|||
|
|||
|
|||
def create_headers( |
|||
token: str | None = None, |
|||
with_content: bool = False, |
|||
request_id: str | None = None, |
|||
) -> Dict[str, str]: |
|||
headers: Dict[str, str] = {} |
|||
|
|||
if token: |
|||
headers.update([(AUTHORIZATION[0], AUTHORIZATION[1] % token)]) |
|||
if with_content: |
|||
headers.update([CONTENT_TYPE]) |
|||
if request_id: |
|||
headers.update([(X_REQUEST_ID[0], X_REQUEST_ID[1] % request_id)]) |
|||
|
|||
return headers |
@ -0,0 +1,67 @@ |
|||
from __future__ import annotations |
|||
|
|||
import json |
|||
from typing import Any, Dict |
|||
|
|||
from requests import Session |
|||
|
|||
from ..todoist_api_python.headers import create_headers |
|||
|
|||
|
|||
def get( |
|||
session: Session, |
|||
url: str, |
|||
token: str | None = None, |
|||
params: Dict[str, Any] | None = None, |
|||
): |
|||
response = session.get(url, params=params, headers=create_headers(token=token)) |
|||
|
|||
if response.status_code == 200: |
|||
return response.json() |
|||
|
|||
response.raise_for_status() |
|||
return response.ok |
|||
|
|||
|
|||
def post( |
|||
session: Session, |
|||
url: str, |
|||
token: str | None = None, |
|||
data: Dict[str, Any] | None = None, |
|||
): |
|||
request_id = data.pop("request_id", None) if data else None |
|||
|
|||
headers = create_headers( |
|||
token=token, with_content=True if data else False, request_id=request_id |
|||
) |
|||
|
|||
response = session.post( |
|||
url, |
|||
headers=headers, |
|||
data=json.dumps(data) if data else None, |
|||
) |
|||
|
|||
if response.status_code == 200: |
|||
return response.json() |
|||
|
|||
response.raise_for_status() |
|||
return response.ok |
|||
|
|||
|
|||
def delete( |
|||
session: Session, |
|||
url: str, |
|||
token: str | None = None, |
|||
args: Dict[str, Any] | None = None, |
|||
): |
|||
request_id = args.pop("request_id", None) if args else None |
|||
|
|||
headers = create_headers(token=token, request_id=request_id) |
|||
|
|||
response = session.delete( |
|||
url, |
|||
headers=headers, |
|||
) |
|||
|
|||
response.raise_for_status() |
|||
return response.ok |
@ -0,0 +1,360 @@ |
|||
from __future__ import annotations |
|||
|
|||
from typing import List, Literal |
|||
|
|||
import attr |
|||
|
|||
from ..todoist_api_python.utils import get_url_for_task |
|||
|
|||
VIEW_STYLE = Literal["list", "board"] |
|||
|
|||
|
|||
@attr.s |
|||
class Project(object): |
|||
color: str = attr.ib() |
|||
comment_count: int = attr.ib() |
|||
id: str = attr.ib() |
|||
is_favorite: bool = attr.ib() |
|||
is_inbox_project: bool = attr.ib() |
|||
is_shared: bool = attr.ib() |
|||
is_team_inbox: bool = attr.ib() |
|||
name: str = attr.ib() |
|||
order: int = attr.ib() |
|||
parent_id: str | None = attr.ib() |
|||
url: str = attr.ib() |
|||
view_style: VIEW_STYLE = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
color=obj["color"], |
|||
comment_count=obj["comment_count"], |
|||
id=obj["id"], |
|||
is_favorite=obj["is_favorite"], |
|||
is_inbox_project=obj.get("is_inbox_project"), |
|||
is_shared=obj["is_shared"], |
|||
is_team_inbox=obj.get("is_team_inbox"), |
|||
name=obj["name"], |
|||
order=obj.get("order"), |
|||
parent_id=obj.get("parent_id"), |
|||
url=obj["url"], |
|||
view_style=obj["view_style"], |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Section(object): |
|||
id: str = attr.ib() |
|||
name: str = attr.ib() |
|||
order: int = attr.ib() |
|||
project_id: str = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
id=obj["id"], |
|||
name=obj["name"], |
|||
order=obj["order"], |
|||
project_id=obj["project_id"], |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Due(object): |
|||
date: str = attr.ib() |
|||
is_recurring: bool = attr.ib() |
|||
string: str = attr.ib() |
|||
|
|||
datetime: str | None = attr.ib(default=None) |
|||
timezone: str | None = attr.ib(default=None) |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
date=obj["date"], |
|||
is_recurring=obj["is_recurring"], |
|||
string=obj["string"], |
|||
datetime=obj.get("datetime"), |
|||
timezone=obj.get("timezone"), |
|||
) |
|||
|
|||
def to_dict(self): |
|||
return { |
|||
"date": self.date, |
|||
"is_recurring": self.is_recurring, |
|||
"string": self.string, |
|||
"datetime": self.datetime, |
|||
"timezone": self.timezone, |
|||
} |
|||
|
|||
@classmethod |
|||
def from_quick_add_response(cls, obj): |
|||
due = obj.get("due") |
|||
|
|||
if not due: |
|||
return None |
|||
|
|||
timezone = due.get("timezone") |
|||
|
|||
datetime: str | None = None |
|||
|
|||
if timezone: |
|||
datetime = due["date"] |
|||
|
|||
return cls( |
|||
date=due["date"], |
|||
is_recurring=due["is_recurring"], |
|||
string=due["string"], |
|||
datetime=datetime, |
|||
timezone=timezone, |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Task(object): |
|||
assignee_id: str | None = attr.ib() |
|||
assigner_id: str | None = attr.ib() |
|||
comment_count: int = attr.ib() |
|||
is_completed: bool = attr.ib() |
|||
content: str = attr.ib() |
|||
created_at: str = attr.ib() |
|||
creator_id: str = attr.ib() |
|||
description: str = attr.ib() |
|||
due: Due | None = attr.ib() |
|||
id: str = attr.ib() |
|||
labels: List[str] = attr.ib() |
|||
order: int = attr.ib() |
|||
parent_id: str | None = attr.ib() |
|||
priority: int = attr.ib() |
|||
project_id: str = attr.ib() |
|||
section_id: str | None = attr.ib() |
|||
url: str = attr.ib() |
|||
|
|||
sync_id: str | None = attr.ib(default=None) |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
due: Due | None = None |
|||
|
|||
if obj.get("due"): |
|||
due = Due.from_dict(obj["due"]) |
|||
|
|||
return cls( |
|||
assignee_id=obj.get("assignee_id"), |
|||
assigner_id=obj.get("assigner_id"), |
|||
comment_count=obj["comment_count"], |
|||
is_completed=obj["is_completed"], |
|||
content=obj["content"], |
|||
created_at=obj["created_at"], |
|||
creator_id=obj["creator_id"], |
|||
description=obj["description"], |
|||
due=due, |
|||
id=obj["id"], |
|||
labels=obj.get("labels"), |
|||
order=obj.get("order"), |
|||
parent_id=obj.get("parent_id"), |
|||
priority=obj["priority"], |
|||
project_id=obj["project_id"], |
|||
section_id=obj["section_id"], |
|||
url=obj["url"], |
|||
) |
|||
|
|||
def to_dict(self): |
|||
due: dict | None = None |
|||
|
|||
if self.due: |
|||
due = self.due.to_dict() |
|||
|
|||
return { |
|||
"assignee_id": self.assignee_id, |
|||
"assigner_id": self.assigner_id, |
|||
"comment_count": self.comment_count, |
|||
"is_completed": self.is_completed, |
|||
"content": self.content, |
|||
"created_at": self.created_at, |
|||
"creator_id": self.creator_id, |
|||
"description": self.description, |
|||
"due": due, |
|||
"id": self.id, |
|||
"labels": self.labels, |
|||
"order": self.order, |
|||
"parent_id": self.parent_id, |
|||
"priority": self.priority, |
|||
"project_id": self.project_id, |
|||
"section_id": self.section_id, |
|||
"sync_id": self.sync_id, |
|||
"url": self.url, |
|||
} |
|||
|
|||
@classmethod |
|||
def from_quick_add_response(cls, obj): |
|||
due: Due | None = None |
|||
|
|||
if obj.get("due"): |
|||
due = Due.from_quick_add_response(obj) |
|||
|
|||
return cls( |
|||
assignee_id=obj.get("responsible_uid"), |
|||
assigner_id=obj.get("assigned_by_uid"), |
|||
comment_count=0, |
|||
is_completed=False, |
|||
content=obj["content"], |
|||
created_at=obj["added_at"], |
|||
creator_id=obj["added_by_uid"], |
|||
description=obj["description"], |
|||
due=due, |
|||
id=obj["id"], |
|||
labels=obj["labels"], |
|||
order=obj["child_order"], |
|||
parent_id=obj["parent_id"] or None, |
|||
priority=obj["priority"], |
|||
project_id=obj["project_id"], |
|||
section_id=obj["section_id"] or None, |
|||
sync_id=obj["sync_id"], |
|||
url=get_url_for_task(obj["id"], obj["sync_id"]), |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class QuickAddResult: |
|||
task: Task = attr.ib() |
|||
|
|||
resolved_project_name: str | None = attr.ib(default=None) |
|||
resolved_assignee_name: str | None = attr.ib(default=None) |
|||
resolved_label_names: List[str] | None = attr.ib(default=None) |
|||
resolved_section_name: str | None = attr.ib(default=None) |
|||
|
|||
@classmethod |
|||
def from_quick_add_response(cls, obj): |
|||
project_data = obj["meta"].get("project", {}) |
|||
assignee_data = obj["meta"].get("assignee", {}) |
|||
section_data = obj["meta"].get("section", {}) |
|||
|
|||
resolved_project_name = None |
|||
resolved_assignee_name = None |
|||
resolved_section_name = None |
|||
|
|||
if project_data and len(project_data) == 2: |
|||
resolved_project_name = obj["meta"]["project"][1] |
|||
|
|||
if assignee_data and len(assignee_data) == 2: |
|||
resolved_assignee_name = obj["meta"]["assignee"][1] |
|||
|
|||
if section_data and len(section_data) == 2: |
|||
resolved_section_name = obj["meta"]["section"][1] |
|||
|
|||
return cls( |
|||
task=Task.from_quick_add_response(obj), |
|||
resolved_project_name=resolved_project_name, |
|||
resolved_assignee_name=resolved_assignee_name, |
|||
resolved_label_names=list(obj["meta"]["labels"].values()), |
|||
resolved_section_name=resolved_section_name, |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Collaborator(object): |
|||
id: str = attr.ib() |
|||
email: str = attr.ib() |
|||
name: str = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
id=obj["id"], |
|||
email=obj["email"], |
|||
name=obj["name"], |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Attachment(object): |
|||
resource_type: str | None = attr.ib(default=None) |
|||
|
|||
file_name: str | None = attr.ib(default=None) |
|||
file_size: int | None = attr.ib(default=None) |
|||
file_type: str | None = attr.ib(default=None) |
|||
file_url: str | None = attr.ib(default=None) |
|||
file_duration: int | None = attr.ib(default=None) |
|||
upload_state: str | None = attr.ib(default=None) |
|||
|
|||
image: str | None = attr.ib(default=None) |
|||
image_width: int | None = attr.ib(default=None) |
|||
image_height: int | None = attr.ib(default=None) |
|||
|
|||
url: str | None = attr.ib(default=None) |
|||
title: str | None = attr.ib(default=None) |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
resource_type=obj.get("resource_type"), |
|||
file_name=obj.get("file_name"), |
|||
file_size=obj.get("file_size"), |
|||
file_type=obj.get("file_type"), |
|||
file_url=obj.get("file_url"), |
|||
upload_state=obj.get("upload_state"), |
|||
image=obj.get("image"), |
|||
image_width=obj.get("image_width"), |
|||
image_height=obj.get("image_height"), |
|||
url=obj.get("url"), |
|||
title=obj.get("title"), |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Comment(object): |
|||
attachment: Attachment | None = attr.ib() |
|||
content: str = attr.ib() |
|||
id: str = attr.ib() |
|||
posted_at: str = attr.ib() |
|||
project_id: str | None = attr.ib() |
|||
task_id: str | None = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
attachment: Attachment | None = None |
|||
|
|||
if "attachment" in obj and obj["attachment"] is not None: |
|||
attachment = Attachment.from_dict(obj["attachment"]) |
|||
|
|||
return cls( |
|||
attachment=attachment, |
|||
content=obj["content"], |
|||
id=obj["id"], |
|||
posted_at=obj["posted_at"], |
|||
project_id=obj.get("project_id"), |
|||
task_id=obj.get("task_id"), |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class Label: |
|||
id: str = attr.ib() |
|||
name: str = attr.ib() |
|||
color: str = attr.ib() |
|||
order: int = attr.ib() |
|||
is_favorite: bool = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
id=obj["id"], |
|||
name=obj["name"], |
|||
color=obj["color"], |
|||
order=obj["order"], |
|||
is_favorite=obj["is_favorite"], |
|||
) |
|||
|
|||
|
|||
@attr.s |
|||
class AuthResult: |
|||
access_token: str = attr.ib() |
|||
state: str = attr.ib() |
|||
|
|||
@classmethod |
|||
def from_dict(cls, obj): |
|||
return cls( |
|||
access_token=obj["access_token"], |
|||
state=obj["state"], |
|||
) |
@ -0,0 +1,18 @@ |
|||
from __future__ import annotations |
|||
|
|||
import asyncio |
|||
|
|||
SHOW_TASK_ENDPOINT = "https://todoist.com/showTask" |
|||
|
|||
|
|||
def get_url_for_task(task_id: int, sync_id: int | None) -> str: |
|||
return ( |
|||
f"{SHOW_TASK_ENDPOINT}?id={task_id}&sync_id={sync_id}" |
|||
if sync_id |
|||
else f"{SHOW_TASK_ENDPOINT}?id={task_id}" |
|||
) |
|||
|
|||
|
|||
async def run_async(func): |
|||
loop = asyncio.get_event_loop() |
|||
return await loop.run_in_executor(None, func) |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,572 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title>Todoist Integration</title> |
|||
<!-- Bootstrap CSS --> |
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" |
|||
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"> |
|||
<link rel="preconnect" href="https://fonts.googleapis.com"> |
|||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
|||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"> |
|||
</head> |
|||
<body> |
|||
<section> |
|||
<div class="container" style="font-family: 'Inter', sans-serif !important;background-color: #fff !important;"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between flex-wrap align-items-sm-center" |
|||
style="border-bottom:1px solid rgba(0, 0, 0, 0.22)"> |
|||
<div class="my-3"> |
|||
<img src="assets/misc/Cybrosys R.png" style="width:auto !important; height:40px !important"> |
|||
</div> |
|||
<div class="my-3 d-flex align-items-center"> |
|||
<div class="text-center" |
|||
style="background-color:#017E84 !important;font-size: 0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;"> |
|||
Community |
|||
</div> |
|||
<div class="text-center" |
|||
style="background-color:#875A7B !important; color:#fff !important;font-size: 0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important;min-width: 120px !important;"> |
|||
Enterprise |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12 text-center d-flex align-items-center flex-column" |
|||
style="margin: 80px 0px !important;"> |
|||
<h1 style="font-size: 2.8rem;font-weight: 700; color: |
|||
#1A202C;"> |
|||
Todoist Integration</h1> |
|||
<p class="my-3 mb-4" |
|||
style="max-width: 80%; font-weight: 400 !important; line-height: 32px; color: #718096;"> |
|||
This module enables the connection of Todoist with Odoo. |
|||
</p> |
|||
<div style="width: 80%; margin-top: 3rem;"> |
|||
<img src="assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5 mb-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#714b67 !important">Key Highlights |
|||
</p> |
|||
</div> |
|||
<div class="row py-4"> |
|||
<div class="col-md-6 col-sm-12 p-3"> |
|||
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px; |
|||
background: #FFF; |
|||
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); "> |
|||
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67; |
|||
display: flex; justify-content: center; align-items: center; |
|||
margin-right: 10px; flex-shrink: 0;"> |
|||
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i> |
|||
</div> |
|||
<div> |
|||
<p style="color: #1A202C;font-weight: 600; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Sync projects and tasks directly from Todoist.</p> |
|||
<p class="m-0" style="color:#718096"> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6 col-sm-12 p-3"> |
|||
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px; |
|||
background: #FFF; |
|||
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); "> |
|||
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67; |
|||
display: flex; justify-content: center; align-items: center; |
|||
margin-right: 10px; flex-shrink: 0;"> |
|||
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i> |
|||
</div> |
|||
<div> |
|||
<p style="color: #1A202C;font-weight: 600; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Community & Enterprise Support</p> |
|||
<p class="m-0" style="color:#718096">Available in Odoo 17.0 Community and Enterprise. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container rounded" > |
|||
<ul class="nav nav-tabs d-flex" style="width: fit-content;margin: 0 auto;gap: 1rem;"> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a |
|||
class="active show" data-toggle="tab" href="#tab1" |
|||
style="color: #fff;font-weight: 500; background-color: #714B67; text-decoration: none;"> |
|||
<i class="fa-regular fa-image pr-2" style="color: #fff;"></i> |
|||
Screenshots</a></li> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a |
|||
data-toggle="tab" href="#tab2" |
|||
style="color: #fff;font-weight: 500; text-decoration: none;"><i |
|||
class="fa-solid fa-star pr-2" style="color: #fff;"></i>Features</a></li> |
|||
<li class="col text-center py-2 text-nowrap " |
|||
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a |
|||
data-toggle="tab" href="#tab3" |
|||
style="color: #fff;font-weight: 500; text-decoration: none; background-color: #714B67;"><i |
|||
class="fa-solid fa-book-open pr-2" style="color: #fff;"></i>Released Notes</a></li> |
|||
</ul> |
|||
<div class="tab-content" style="background-color: rgba(121, 113, 119, 0.04);"> |
|||
<div id="tab1" class="tab-pane fade in active show"> |
|||
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screenshots/screenshot1.png" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Todoist App View. |
|||
</h4></div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screenshots/screenshot2.png" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
User can copy the token from integration and paste in odoo to |
|||
complete the authentication. |
|||
</h4></div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screenshots/screenshot3.png" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Take Preference form and paste the Token from Todoist App and |
|||
use the sync button to take the projects |
|||
and tasks from Todoist App to Odoo Project Module. |
|||
</h4></div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screenshots/screenshot4.png" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Project View. |
|||
</h4></div> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;"> |
|||
<div |
|||
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="row justify-content-center p-3 w-100 m-0"> |
|||
<img src="assets/screenshots/screenshot5.png" class="img-responsive" width="100%" height="auto"> |
|||
</div> |
|||
<div class="px-3"> |
|||
<h4 class="mt-2" |
|||
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important"> |
|||
Task view. |
|||
</h4></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div id="tab2" class="tab-pane fade"> |
|||
<div class="col-mg-12" style="padding: 1rem 4rem;"> |
|||
<ul style="list-style: none; padding: 1rem 0;font-weight: 500;"> |
|||
<li class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt="" |
|||
width="16px"></span>Sync projects and tasks directly from Todoist. |
|||
</li> |
|||
<li class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt="" |
|||
width="16px"></span>Available in |
|||
Odoo 17.0 Community, Enterprise |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
<div id="tab3" class="tab-pane fade"> |
|||
<div class="col-mg-12 active" style="padding: 1rem 4rem;"> |
|||
<div class="py-3" |
|||
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);"> |
|||
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version |
|||
17.0.1.0.0</span><span class="px-2">|</span><span |
|||
style="color: #714B67;font-weight: 600;">Released on:18th June 2025</span> |
|||
</div> |
|||
<p class="m-0" |
|||
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;"> |
|||
|
|||
Initial Commit for Todoist Integration</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5"> |
|||
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Related Products</p> |
|||
</div> |
|||
</div> |
|||
<div id="myCarousel" class="carousel slide py-3" data-ride="carousel"> |
|||
<div class="carousel-inner"> |
|||
<div class="carousel-item active"> |
|||
<div class="row p-4"> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/project_progress_bar" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/b1.jpg" alt="" width="100%" height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Project and Task Progress Status</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/project_task_attachments" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/b2.png" alt="" width="100%" height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Project And Task Attachments</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/projects_task_checklists" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/b3.png" alt="" width="100%" height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Project Task Checklist</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item"> |
|||
<div class="row p-4"> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/manufacturing_timesheet" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px; "> |
|||
<img src="assets/modules/b04.jpg" alt="" width="100%" height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Manufacturing (MRP) Timesheet</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/project_task_access" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px;"> |
|||
<img src="assets/modules/b5.jpg" alt="" width="100%" height="auto"> |
|||
|
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Users Restriction For Project And Task</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col"> |
|||
<div class="p-3"> |
|||
<a href="https://apps.odoo.com/apps/modules/17.0/project_report_pdf" style="color: #000; text-decoration: none;"> |
|||
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;"> |
|||
<div style="width: 300px;"> |
|||
<img src="assets/modules/b6.png" alt="" width="100%" height="auto"> |
|||
</div> |
|||
<p class="text-center pt-2 text-black font-weight-bold">Project Report XLS & PDF</p> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<a class="carousel-control-prev" href="#myCarousel" data-slide="prev" style="width: 35px; color: #000;"> |
|||
<span class="carousel-control-prev-icon"> |
|||
<i class="fa fa-chevron-left" style="font-size: 24px;"></i> |
|||
</span> |
|||
</a> |
|||
<a class="carousel-control-next" href="#myCarousel" data-slide="next" style="width: 35px; color: #000;"> |
|||
<span class="carousel-control-next-icon"> |
|||
<i class="fa fa-chevron-right" style="font-size: 24px;"></i> |
|||
</span> |
|||
</a> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Services</p> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row py-3"> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#13EA36 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/cogs.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Customization</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#DBC711; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/wrench.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#FF6B6B ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/lifebuoy.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Support</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#FFA801 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/user.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Hire Odoo Developer</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;"> |
|||
|
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#54A0FF; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/puzzle.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Integration</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#6D7680 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/update.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Migration</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#786FA6 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/consultation.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Consultancy</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#F8A5C2 ; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/training.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4 col-sm-6 px-4 py-4"> |
|||
<div |
|||
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;"> |
|||
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);"> |
|||
<div style="background-color:#E6BE26; border-radius: 50%; padding: 15px; width: 68px; |
|||
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);"> |
|||
<img src="assets/icons/license.png" alt="service-icon" width="38px" height="auto"> |
|||
</div> |
|||
</div> |
|||
<p style="margin-top: 20px; font-weight: bold;">Odoo Licensing Consultancy</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4"> |
|||
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Industries</p> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
<div class="row my-5 py-4"> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100 " |
|||
style="border-right: 1px solid rgb(209, 209, 209); border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; box-shadow: 6px 0 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/trading-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Trading</p> |
|||
<p>Easily procure and sell your products</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgb(209, 209, 209); padding: 30px;"> |
|||
<img src="assets/icons/pos-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">POS</p> |
|||
<p>Easy configuration and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgba(0, 0, 0, 0.2); padding: 30px; box-shadow: 0 5px 10px rgba(228, 227, 227, 0.373)"> |
|||
<img src="assets/icons/education-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Education</p> |
|||
<p>A platform for educational management</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; "> |
|||
<img src="assets/icons/manufacturing-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Manufacturing</p> |
|||
<p>Plan, track and schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;"> |
|||
<img src="assets/icons/ecom-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">E-commerce & Website</p> |
|||
<p>Mobile friendly, awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;box-shadow: 0 -5px 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/service-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Service Management</p> |
|||
<p>Keep track of services and invoice</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px; "> |
|||
<img src="assets/icons/restaurant-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Restaurant</p> |
|||
<p>Run your bar or restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3 col-sm-6 p-0"> |
|||
<div class="d-flex flex-column h-100" |
|||
style=" padding: 30px;box-shadow: -5px 0 10px rgba(228, 227, 227, 0.373);"> |
|||
<img src="assets/icons/hotel-black.png" width="42px" height="auto" alt=""> |
|||
<p style="color: #714B67;font-weight: 600; margin-top: 10px; |
|||
font-size: 1.2rem; margin-bottom: 2px;">Hotel Management</p> |
|||
<p>An all-inclusive hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5"> |
|||
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Support</p> |
|||
</div> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row" style="background-color: #FFFAFE;"> |
|||
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center" |
|||
style="border-right: 1px solid #D9D9D9;"> |
|||
<div style="padding: 30px;"> |
|||
<div class="d-flex align-items-center"> |
|||
<img src="assets/misc/support (1) 1.svg" alt="" width="60px" style="margin-right: 12px;"> |
|||
<div style="padding: 0px 8px;"> |
|||
<span |
|||
style="color: #714B67;font-size: 24px;font-weight: 600;padding-bottom: 1rem;">Need |
|||
Help?</span> |
|||
<p class="m-0" style="color:#718096;">Got questions or need help? Get in touch.</p> |
|||
<div style="font-weight: 400;"><span><img src="assets/misc/support-email.svg" alt="" |
|||
width="18px" |
|||
style="filter: invert(1);margin-right: 0.8rem;"></span>odoo@cybrosys.com |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center"> |
|||
<div style="padding: 30px;"> |
|||
<div class="d-flex align-items-center"> |
|||
<img src="assets/misc/whatsapp 1.svg" alt="" width="60px" style="margin-right: 12px;"> |
|||
<div> |
|||
<span style="color: #714B67;font-size: 24px;font-weight: 600;">WhatsApp</span> |
|||
<p class="m-0" style="color:#718096;">Say hi to us on WhatsApp!</p> |
|||
<div style="font-weight: 400; font-size: 16px;"><span><img src="assets/misc/phone.svg" |
|||
alt="" width="14px" |
|||
style="filter: invert(1); margin-right: 0.8rem;"></span>+91 |
|||
99456767686</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<!-- Optional JavaScript --> |
|||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> |
|||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
|||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!--Sync button record with field to provide access token--> |
|||
<record id="view_users_form_simple_modif" model="ir.ui.view"> |
|||
<field name="name">res.users.view.form.inherit.todoist.project</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="base.view_users_form_simple_modif"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//group[@name='signature']" position="after"> |
|||
<group name="todoist" string="Todoist Settings"> |
|||
<field name="todoist_token" readonly="0" |
|||
options="{'style-inline': true}"/> |
|||
<button name="action_sync_todoist_with_odoo" |
|||
string="Sync with Todoist" |
|||
type="object" |
|||
class="btn btn-primary" |
|||
icon="fa-refresh"/> |
|||
</group> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |