diff --git a/calendar_event_link_project_task/README.rst b/calendar_event_link_project_task/README.rst new file mode 100644 index 00000000..e9933bab --- /dev/null +++ b/calendar_event_link_project_task/README.rst @@ -0,0 +1,76 @@ +=================================== +Calendar Event Link To Project Task +=================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:be59b50b727665c4f63f201f30a825ab4a99386afb48e987f2b0817bfad3da36 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcalendar-lightgray.png?logo=github + :target: https://github.com/OCA/calendar/tree/16.0/calendar_event_link_project_task + :alt: OCA/calendar +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/calendar-16-0/calendar-16-0-calendar_event_link_project_task + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/calendar&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module add a link between project tasks and calendar events + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ACSONE SA/NV + +Contributors +~~~~~~~~~~~~ + +* Souheil Bejaoui + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/calendar `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/calendar_event_link_project_task/__init__.py b/calendar_event_link_project_task/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/calendar_event_link_project_task/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/calendar_event_link_project_task/__manifest__.py b/calendar_event_link_project_task/__manifest__.py new file mode 100644 index 00000000..989955bc --- /dev/null +++ b/calendar_event_link_project_task/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Calendar Event Link To Project Task", + "summary": """ + This module add a link between project tasks and calendar events""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/calendar", + "depends": ["project", "calendar_event_link_base"], + "data": ["views/project_task.xml"], + "demo": [], +} diff --git a/calendar_event_link_project_task/i18n/calendar_event_link_project_task.pot b/calendar_event_link_project_task/i18n/calendar_event_link_project_task.pot new file mode 100644 index 00000000..dc581ebc --- /dev/null +++ b/calendar_event_link_project_task/i18n/calendar_event_link_project_task.pot @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * calendar_event_link_project_task +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: calendar_event_link_project_task +#: model_terms:ir.ui.view,arch_db:calendar_event_link_project_task.project_task_form_view +msgid "Meetings\n" +" Meeting" +msgstr "" + +#. module: calendar_event_link_project_task +#: model:ir.model,name:calendar_event_link_project_task.model_project_task +msgid "Task" +msgstr "" + diff --git a/calendar_event_link_project_task/models/__init__.py b/calendar_event_link_project_task/models/__init__.py new file mode 100644 index 00000000..edf2d36b --- /dev/null +++ b/calendar_event_link_project_task/models/__init__.py @@ -0,0 +1 @@ +from . import project_task diff --git a/calendar_event_link_project_task/models/project_task.py b/calendar_event_link_project_task/models/project_task.py new file mode 100644 index 00000000..e995c883 --- /dev/null +++ b/calendar_event_link_project_task/models/project_task.py @@ -0,0 +1,9 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ProjectTask(models.Model): + _name = "project.task" + _inherit = ["project.task", "calendar.event.link.mixin"] diff --git a/calendar_event_link_project_task/readme/CONTRIBUTORS.rst b/calendar_event_link_project_task/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..50e6298d --- /dev/null +++ b/calendar_event_link_project_task/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Souheil Bejaoui diff --git a/calendar_event_link_project_task/readme/DESCRIPTION.rst b/calendar_event_link_project_task/readme/DESCRIPTION.rst new file mode 100644 index 00000000..d3ddf319 --- /dev/null +++ b/calendar_event_link_project_task/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module add a link between project tasks and calendar events diff --git a/calendar_event_link_project_task/static/description/icon.png b/calendar_event_link_project_task/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/calendar_event_link_project_task/static/description/icon.png differ diff --git a/calendar_event_link_project_task/static/description/index.html b/calendar_event_link_project_task/static/description/index.html new file mode 100644 index 00000000..8a7ea4cf --- /dev/null +++ b/calendar_event_link_project_task/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +Calendar Event Link To Project Task + + + + + + diff --git a/calendar_event_link_project_task/tests/test_calendar_task_link.py b/calendar_event_link_project_task/tests/test_calendar_task_link.py new file mode 100644 index 00000000..085c71be --- /dev/null +++ b/calendar_event_link_project_task/tests/test_calendar_task_link.py @@ -0,0 +1,29 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestCalendarTaskLink(TransactionCase): + def setUp(self): + super(TestCalendarTaskLink, self).setUp() + self.task = self.env["project.task"].search([], limit=1) + + def test_calendar_task_link(self): + calendar_task_link_action = self.task.action_show_events() + event = ( + self.env["calendar.event"] + .with_context(**calendar_task_link_action["context"]) + .create( + { + "name": "task", + "start": "2019-10-29 10:00:00", + "stop": "2019-10-29 11:00:00", + } + ) + ) + self.assertEqual(self.task.event_count, 1) + self.assertEqual( + self.env["calendar.event"].search(calendar_task_link_action["domain"]), + event, + ) diff --git a/calendar_event_link_project_task/views/project_task.xml b/calendar_event_link_project_task/views/project_task.xml new file mode 100644 index 00000000..43f83047 --- /dev/null +++ b/calendar_event_link_project_task/views/project_task.xml @@ -0,0 +1,33 @@ + + + + + + project.task + + + + + + + + + diff --git a/setup/calendar_event_link_project_task/odoo/addons/calendar_event_link_project_task b/setup/calendar_event_link_project_task/odoo/addons/calendar_event_link_project_task new file mode 120000 index 00000000..8f456ea0 --- /dev/null +++ b/setup/calendar_event_link_project_task/odoo/addons/calendar_event_link_project_task @@ -0,0 +1 @@ +../../../../calendar_event_link_project_task \ No newline at end of file diff --git a/setup/calendar_event_link_project_task/setup.py b/setup/calendar_event_link_project_task/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/calendar_event_link_project_task/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)