diff --git a/agreement_project/README.rst b/agreement_project/README.rst new file mode 100644 index 00000000..9320be6e --- /dev/null +++ b/agreement_project/README.rst @@ -0,0 +1,112 @@ +=================== +Agreement - Project +=================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fcontract-lightgray.png?logo=github + :target: https://github.com/OCA/contract/tree/12.0/agreement_project + :alt: OCA/contract +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_project + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/110/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Odoo Agreement App does not provide an easy way to access project tasks related to an agreement. +Some organizations needs to have a quick access to project tasks to track the performance of an agreement. + +This module allows you to link a project task to an agreement and +adds a smart button on the agreement to look at the list of related project tasks. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Go to Project > Configuration > Projects +* Select or create a project and set the agreement +* Go to Agreement > Agreements +* Open the previous agreement +* Click on the smart button "Tasks" to see the list of related project tasks + +Known issues / Roadmap +====================== + +The roadmap of the Agreement application is documented on +`Github `_. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Sandip Mangukiya + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* Open Source Integrators + +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. + +.. |maintainer-smangukiya| image:: https://github.com/smangukiya.png?size=40px + :target: https://github.com/smangukiya + :alt: smangukiya +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainers `__: + +|maintainer-smangukiya| |maintainer-max3903| + +This module is part of the `OCA/contract `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/agreement_project/__init__.py b/agreement_project/__init__.py new file mode 100644 index 00000000..631bd489 --- /dev/null +++ b/agreement_project/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/agreement_project/__manifest__.py b/agreement_project/__manifest__.py new file mode 100644 index 00000000..260a41d9 --- /dev/null +++ b/agreement_project/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Agreement - Project', + 'summary': 'Link projects to an agreement', + 'version': '12.0.1.0.0', + 'category': 'Contract', + 'author': 'Open Source Integrators, ' + 'Yves Goldberg (Ygol Internetwork), ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/contract', + 'depends': [ + 'agreement_legal', + 'project', + ], + 'data': [ + 'views/agreement_view.xml', + 'views/project_view.xml', + ], + 'installable': True, + 'license': 'AGPL-3', + 'development_status': 'Beta', + 'maintainers': [ + 'smangukiya', + 'ygol', + 'max3903', + ], +} diff --git a/agreement_project/i18n/agreement_project.pot b/agreement_project/i18n/agreement_project.pot new file mode 100644 index 00000000..4f7331a1 --- /dev/null +++ b/agreement_project/i18n/agreement_project.pot @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_project +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_agreement_task_count +msgid "# Tasks" +msgstr "" + +#. module: agreement_project +#: model:ir.ui.view,arch_db:agreement_project.partner_agreement_form_view_task +msgid "Tasks" +msgstr "" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_project_agreement_id +#: model:ir.model.fields,field_description:agreement_project.field_project_task_agreement_id +msgid "Agreement" +msgstr "" + +#. module: agreement_project +#: model:ir.actions.act_window,help:agreement_project.action_project_task_agreement_specific +msgid "Create Tasks" +msgstr "" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_project +msgid "Project" +msgstr "" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_task_serviceprofile_id +#: model:ir.ui.view,arch_db:agreement_project.view_task_search_form_agreement +msgid "Service Profile" +msgstr "" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_task +msgid "Task" +msgstr "" + +#. module: agreement_project +#: model:ir.actions.act_window,name:agreement_project.action_project_task_agreement_specific +msgid "Tasks" +msgstr "" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_agreement +msgid "agreement" +msgstr "" + diff --git a/agreement_project/i18n/de.po b/agreement_project/i18n/de.po new file mode 100644 index 00000000..ea468c43 --- /dev/null +++ b/agreement_project/i18n/de.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_project +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-01-11 17:41+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.3\n" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_agreement_task_count +msgid "# Tasks" +msgstr "# Aufgaben" + +#. module: agreement_project +#: model:ir.ui.view,arch_db:agreement_project.partner_agreement_form_view_task +msgid "Tasks" +msgstr "Aufgaben" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_project_agreement_id +#: model:ir.model.fields,field_description:agreement_project.field_project_task_agreement_id +msgid "Agreement" +msgstr "Vereinbarung" + +#. module: agreement_project +#: model:ir.actions.act_window,help:agreement_project.action_project_task_agreement_specific +msgid "Create Tasks" +msgstr "Aufgaben anlegen" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_project +msgid "Project" +msgstr "Projekt" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_task_serviceprofile_id +#: model:ir.ui.view,arch_db:agreement_project.view_task_search_form_agreement +msgid "Service Profile" +msgstr "Dienstleistungsprofil" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_task +msgid "Task" +msgstr "Aufgabe" + +#. module: agreement_project +#: model:ir.actions.act_window,name:agreement_project.action_project_task_agreement_specific +msgid "Tasks" +msgstr "Aufgaben" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_agreement +msgid "agreement" +msgstr "Vereinbarung" diff --git a/agreement_project/i18n/fr.po b/agreement_project/i18n/fr.po new file mode 100644 index 00000000..10457853 --- /dev/null +++ b/agreement_project/i18n/fr.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_project +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-03-18 22:14+0000\n" +"Last-Translator: Yves Goldberg \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.5.1\n" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_agreement_task_count +msgid "# Tasks" +msgstr "# Tâches" + +#. module: agreement_project +#: model:ir.ui.view,arch_db:agreement_project.partner_agreement_form_view_task +msgid "Tasks" +msgstr "Tâches" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_project_agreement_id +#: model:ir.model.fields,field_description:agreement_project.field_project_task_agreement_id +msgid "Agreement" +msgstr "Accord" + +#. module: agreement_project +#: model:ir.actions.act_window,help:agreement_project.action_project_task_agreement_specific +msgid "Create Tasks" +msgstr "Créer des tâches" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_project +msgid "Project" +msgstr "Projet" + +#. module: agreement_project +#: model:ir.model.fields,field_description:agreement_project.field_project_task_serviceprofile_id +#: model:ir.ui.view,arch_db:agreement_project.view_task_search_form_agreement +msgid "Service Profile" +msgstr "Profil de service" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_project_task +msgid "Task" +msgstr "Tâche" + +#. module: agreement_project +#: model:ir.actions.act_window,name:agreement_project.action_project_task_agreement_specific +msgid "Tasks" +msgstr "Tâches" + +#. module: agreement_project +#: model:ir.model,name:agreement_project.model_agreement +msgid "agreement" +msgstr "accord" diff --git a/agreement_project/models/__init__.py b/agreement_project/models/__init__.py new file mode 100644 index 00000000..6cc31949 --- /dev/null +++ b/agreement_project/models/__init__.py @@ -0,0 +1,7 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + project, + agreement, +) diff --git a/agreement_project/models/agreement.py b/agreement_project/models/agreement.py new file mode 100644 index 00000000..9c6311b3 --- /dev/null +++ b/agreement_project/models/agreement.py @@ -0,0 +1,18 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class Agreement(models.Model): + _inherit = "agreement" + + task_count = fields.Integer('# Tasks', + compute='_compute_task_count') + + @api.multi + def _compute_task_count(self): + for ag in self: + count = self.env['project.task'].search_count( + [('agreement_id', 'in', self.ids)]) + ag.task_count = count diff --git a/agreement_project/models/project.py b/agreement_project/models/project.py new file mode 100644 index 00000000..261d3183 --- /dev/null +++ b/agreement_project/models/project.py @@ -0,0 +1,19 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProjectProject(models.Model): + _inherit = "project.project" + + agreement_id = fields.Many2one('agreement', 'Agreement') + + +class ProjectTask(models.Model): + _inherit = "project.task" + + agreement_id = fields.Many2one('agreement', + related="project_id.agreement_id", + string='Agreement', + store=True) diff --git a/agreement_project/readme/CONTRIBUTORS.rst b/agreement_project/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..afa3bb04 --- /dev/null +++ b/agreement_project/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Sandip Mangukiya +* Yves Goldberg diff --git a/agreement_project/readme/CREDITS.rst b/agreement_project/readme/CREDITS.rst new file mode 100644 index 00000000..0eff0acf --- /dev/null +++ b/agreement_project/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* Open Source Integrators diff --git a/agreement_project/readme/DESCRIPTION.rst b/agreement_project/readme/DESCRIPTION.rst new file mode 100644 index 00000000..2891ec21 --- /dev/null +++ b/agreement_project/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +Odoo Agreement App does not provide an easy way to access project tasks related to an agreement. +Some organizations needs to have a quick access to project tasks to track the performance of an agreement. + +This module allows you to link a project task to an agreement and +adds a smart button on the agreement to look at the list of related project tasks. diff --git a/agreement_project/readme/ROADMAP.rst b/agreement_project/readme/ROADMAP.rst new file mode 100644 index 00000000..7e6402cf --- /dev/null +++ b/agreement_project/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +The roadmap of the Agreement application is documented on +`Github `_. diff --git a/agreement_project/readme/USAGE.rst b/agreement_project/readme/USAGE.rst new file mode 100644 index 00000000..44d6b123 --- /dev/null +++ b/agreement_project/readme/USAGE.rst @@ -0,0 +1,7 @@ +To use this module, you need to: + +* Go to Project > Configuration > Projects +* Select or create a project and set the agreement +* Go to Agreement > Agreements +* Open the previous agreement +* Click on the smart button "Tasks" to see the list of related project tasks diff --git a/agreement_project/static/description/icon.png b/agreement_project/static/description/icon.png new file mode 100644 index 00000000..23ce9313 Binary files /dev/null and b/agreement_project/static/description/icon.png differ diff --git a/agreement_project/static/description/index.html b/agreement_project/static/description/index.html new file mode 100644 index 00000000..cd68e087 --- /dev/null +++ b/agreement_project/static/description/index.html @@ -0,0 +1,450 @@ + + + + + + +Agreement - Project + + + +
+

Agreement - Project

+ + +

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

+

Odoo Agreement App does not provide an easy way to access project tasks related to an agreement. +Some organizations needs to have a quick access to project tasks to track the performance of an agreement.

+

This module allows you to link a project task to an agreement and +adds a smart button on the agreement to look at the list of related project tasks.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Go to Project > Configuration > Projects
  • +
  • Select or create a project and set the agreement
  • +
  • Go to Agreement > Agreements
  • +
  • Open the previous agreement
  • +
  • Click on the smart button “Tasks” to see the list of related project tasks
  • +
+
+
+

Known issues / Roadmap

+

The roadmap of the Agreement application is documented on +Github.

+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+ +
+

Other credits

+

The development of this module has been financially supported by:

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainers:

+

smangukiya max3903

+

This module is part of the OCA/contract project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/agreement_project/views/agreement_view.xml b/agreement_project/views/agreement_view.xml new file mode 100644 index 00000000..ec44ea08 --- /dev/null +++ b/agreement_project/views/agreement_view.xml @@ -0,0 +1,40 @@ + + + + + Tasks + ir.actions.act_window + project.task + form + tree,form + [('agreement_id', '=', active_id)] + +

+ Create Tasks +

+
+
+ + + agreement.form.task + agreement + + + + + + + + +
diff --git a/agreement_project/views/project_view.xml b/agreement_project/views/project_view.xml new file mode 100644 index 00000000..8cc7e883 --- /dev/null +++ b/agreement_project/views/project_view.xml @@ -0,0 +1,25 @@ + + + + + project.project.form.agreement + project.project + + + + + + + + + project.task.form.agreement + project.task + + + + + + + +