@ -0,0 +1,41 @@ |
|||
.. 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: (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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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': '16.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.png'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,7 @@ |
|||
## Module <todoist_project> |
|||
|
|||
#### 30.01.2024 |
|||
#### Version 16.0.1.0.0 |
|||
##### ADD |
|||
|
|||
- Initial commit for Todoist Integration |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Sayanth M K(<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,210 @@ |
|||
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]: |
|||
print('eeeeeeee') |
|||
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: 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.2 KiB |
After Width: | Height: | Size: 673 B |
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: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 457 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,655 @@ |
|||
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div class="d-flex align-items-center justify-content-between" |
|||
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
|||
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" |
|||
style="width: 42px; height: 42px;"/> |
|||
<div> |
|||
<div |
|||
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Community |
|||
</div> |
|||
<div |
|||
style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Enterprise |
|||
</div> |
|||
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Odoo.sh |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12" |
|||
> |
|||
<h1 |
|||
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;"> |
|||
Todoist Integration</h1> |
|||
<p |
|||
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;"> |
|||
This module enables the connection of Todoist with Odoo. |
|||
</p> |
|||
<img src="./assets/screenshots/hero.gif" class="img-responsive" |
|||
width="100%" height="auto"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/compass.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Explore This |
|||
Module</h2> |
|||
</div> |
|||
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#overview"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn |
|||
more about this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#features"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
features of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#screenshots"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
screenshots for this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="overview"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pie-chart.png"/> |
|||
</div> |
|||
<h2 |
|||
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
|||
<i class="fa fa-pie-chart mr-2"></i>Overview |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
<p |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;"> |
|||
This module enables the integration of Todoist and Odoo. |
|||
Projects and tasks from Todoist to Odoo will be managed in this |
|||
way.</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="features"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/features.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Features |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<h4 |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sync projects and tasks directly from Todoist.</h4> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="screenshots"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pictures.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Screenshots |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Todoist App View.</h4> |
|||
|
|||
<img src="assets/screenshots/1.0.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; 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> |
|||
|
|||
<img src="assets/screenshots/picture_5.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; 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> |
|||
|
|||
<img src="assets/screenshots/1.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Project View.</h4> |
|||
<img src="assets/screenshots/2.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
<div class="col-lg-12 my-2"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Task Form View.</h4> |
|||
<img src="assets/screenshots/3.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
</div> |
|||
<!-- RELATED PRODUCTS --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/categories.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Related |
|||
Products |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner" style="padding: 30px;"> |
|||
<div class="carousel-item" style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/whatsapp_mail_messaging/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/11.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/whatsapp_redirect/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/12.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/insta_feed_snippet/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/13.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item active" |
|||
style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/website_floating_whatsapp_icon/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/14.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/whatsapp_chat_layout/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/15.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/fb_messenger/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/16.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Left and right controls --> |
|||
<a class="carousel-control-prev" href="#demo1" |
|||
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="#demo1" |
|||
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> |
|||
</div> |
|||
<!-- END OF RELATED PRODUCTS --> |
|||
|
|||
<!-- OUR SERVICES --> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/star.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our Services |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/cogs.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Customization</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/wrench.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/lifebuoy.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Support</h6> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/user.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Hire |
|||
Odoo |
|||
Developer</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/puzzle.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Integration</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/update.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Migration</h6> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/consultation.png" |
|||
class="img-responsive" height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Consultancy</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/training.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/license.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Licensing Consultancy</h6> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<!-- END OF OUR SERVICES --> |
|||
|
|||
<!-- OUR INDUSTRIES --> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/corporate.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our |
|||
Industries |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/trading-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Trading |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easily procure |
|||
and |
|||
sell your products</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/pos-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
POS |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easy |
|||
configuration |
|||
and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/education-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Education |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
A platform for |
|||
educational management</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/manufacturing-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Manufacturing |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Plan, track and |
|||
schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/ecom-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
E-commerce & Website |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Mobile |
|||
friendly, |
|||
awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/service-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Service Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Keep track of |
|||
services and invoice</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/restaurant-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Restaurant |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Run your bar or |
|||
restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/hotel-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Hotel Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
An |
|||
all-inclusive |
|||
hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- END OF OUR INDUSTRIES --> |
|||
|
|||
<!-- SUPPORT --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/customer-support.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Support |
|||
</h2> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4 d-flex justify-content-center align-items-center" |
|||
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/support.png" height="48" |
|||
width="48" style="width: 42px; height: 42px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>Need Help?</h4> |
|||
<p style="line-height: 100%;">Got questions or need |
|||
help? Get in touch.</p> |
|||
<a href="mailto:odoo@cybrosys.com"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
odoo@cybrosys.com</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4 d-flex justify-content-center align-items-center" |
|||
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/whatsapp.png" height="52" |
|||
width="52" style="width: 52px; height: 52px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>WhatsApp</h4> |
|||
<p style="line-height: 100%;">Say hi to us on |
|||
WhatsApp!</p> |
|||
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
+91 86068 |
|||
27707</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
|||
<img src="assets/misc/logo.png" width="144" height="31" |
|||
style="width:144px; height: 31px; margin-top: 40px;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUPPORT --> |
|||
</div> |
@ -0,0 +1,24 @@ |
|||
<?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="//field[@name='avatar_128']" position="before"> |
|||
<div class="oe_button_box" name="button_box"> |
|||
<button name="action_sync_todoist_with_odoo" type="object" |
|||
class="oe_stat_button" icon="fa-refresh" |
|||
string="Sync With Todoist"/> |
|||
</div> |
|||
</xpath> |
|||
<xpath expr="//group[@name='signature']" position="after"> |
|||
<group name="todoist" string="Todoist Settings"> |
|||
<field name="todoist_token" readonly="0" |
|||
options="{'style-inline': true}"/> |
|||
</group> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |