diff --git a/website_project_task/__init__.py b/website_project_task/__init__.py new file mode 100644 index 00000000..9a7e03ed --- /dev/null +++ b/website_project_task/__init__.py @@ -0,0 +1 @@ +from . import models \ No newline at end of file diff --git a/website_project_task/__manifest__.py b/website_project_task/__manifest__.py new file mode 100644 index 00000000..82407b3e --- /dev/null +++ b/website_project_task/__manifest__.py @@ -0,0 +1,25 @@ +{ + 'name': 'Website Project Tasks', + 'version': '15.0.1.0.0', + 'author': 'Hibou Corp. ', + 'website': 'https://hibou.io/', + 'license': 'AGPL-3', + 'category': 'Tools', + 'complexity': 'easy', + 'description': """ +This module adds options to Website Project: +============================================ + +* Tags on Tasks +* Classes on Stages and Tags for CSS hooks. + """, + 'depends': [ + 'project', + ], + 'data': [ + 'views/project_task_templates.xml', + ], + 'installable': True, + 'auto_install': False, + 'category': 'Hidden', +} diff --git a/website_project_task/models/__init__.py b/website_project_task/models/__init__.py new file mode 100644 index 00000000..7095229c --- /dev/null +++ b/website_project_task/models/__init__.py @@ -0,0 +1 @@ +from . import project \ No newline at end of file diff --git a/website_project_task/models/project.py b/website_project_task/models/project.py new file mode 100644 index 00000000..da4226be --- /dev/null +++ b/website_project_task/models/project.py @@ -0,0 +1,14 @@ +from odoo import api, exceptions, fields, models, _ + + +class ProjectTask(models.Model): + _name = 'project.task' + _inherit = ['project.task', 'portal.mixin'] + + def preview_task(self): + self.ensure_one() + return { + 'type': 'ir.actions.act_url', + 'target': 'self', + 'url': self.get_portal_url(), + } diff --git a/website_project_task/views/project_task_templates.xml b/website_project_task/views/project_task_templates.xml new file mode 100644 index 00000000..7abb7110 --- /dev/null +++ b/website_project_task/views/project_task_templates.xml @@ -0,0 +1,70 @@ + + + + project.task.form.inherit + project.task + + + + + + + + + + + + + + + + + + +