diff --git a/project_template/README.rst b/project_template/README.rst new file mode 100644 index 0000000000..1bd3b57189 --- /dev/null +++ b/project_template/README.rst @@ -0,0 +1,100 @@ +================= +Project Templates +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:194e0553816f0e3651d753ca8bd2eaa43f6bb892f5c13aef08173c9d3fbe0ac3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproject-lightgray.png?logo=github + :target: https://github.com/OCA/project/tree/17.0/project_template + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_template + :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/project&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds templates for projects. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +1. Have Manager rights for Project group to edit projects and project + templates. +2. Convert project to a project template by setting the "Is Template?" + field on any project. +3. View Templates via the Template filter. +4. Use the "Create Project from Template" link in the drop down menu on + each template while in the Kanban view or the button on the project + template form. + +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 +------- + +* Patrick Wilson + +Contributors +------------ + +- Patrick Wilson +- Alfadil Mustafa +- Mantas Šniukas + +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-patrickrwilson| image:: https://github.com/patrickrwilson.png?size=40px + :target: https://github.com/patrickrwilson + :alt: patrickrwilson + +Current `maintainer `__: + +|maintainer-patrickrwilson| + +This module is part of the `OCA/project `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_template/__init__.py b/project_template/__init__.py new file mode 100644 index 0000000000..aa1a7e339e --- /dev/null +++ b/project_template/__init__.py @@ -0,0 +1,3 @@ +# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). + +from . import models diff --git a/project_template/__manifest__.py b/project_template/__manifest__.py new file mode 100644 index 0000000000..76907aa100 --- /dev/null +++ b/project_template/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2019 Patrick Wilson +# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html). + +{ + "name": "Project Templates", + "summary": """Project Templates""", + "author": "Patrick Wilson, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/project", + "category": "Project Management", + "version": "17.0.1.0.0", + "license": "AGPL-3", + "depends": ["project"], + "data": ["views/project.xml"], + "application": False, + "development_status": "Beta", + "maintainers": ["patrickrwilson"], +} diff --git a/project_template/i18n/de.po b/project_template/i18n/de.po new file mode 100644 index 0000000000..80a5282d6d --- /dev/null +++ b/project_template/i18n/de.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-11-04 14:45+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 4.14.1\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Projekt aus dieser Vorlage erstellen" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Projekt aus dieser Vorlage erstellen" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Projekt-Vorlage" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Projekt-Vorlage?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Keine Vorlage" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projekt" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Vorlagen" + +#~ msgid "Display Name" +#~ msgstr "Anzeigename" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Zuletzt geändert am" diff --git a/project_template/i18n/es.po b/project_template/i18n/es.po new file mode 100644 index 0000000000..c27c39a9b9 --- /dev/null +++ b/project_template/i18n/es.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-07 18:02+0000\n" +"Last-Translator: María Asunción Daza \n" +"Language-Team: none\n" +"Language: es\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.8\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Crear Proyecto desde Plantilla" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Crear Proyecto desde Plantilla" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Es una Plantilla" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "¿Es Una Plantilla?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "No son Plantillas" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Proyecto" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Plantillas" diff --git a/project_template/i18n/es_AR.po b/project_template/i18n/es_AR.po new file mode 100644 index 0000000000..fc00f35282 --- /dev/null +++ b/project_template/i18n/es_AR.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-01 03:48+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\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 4.3.2\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Crear Proyecto desde Plantilla" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Crear Proyecto desde Plantilla" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Es una Plantilla" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "¿Es una Plantilla?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "No-Plantillas" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Proyecto" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Plantillas" + +#~ msgid "Display Name" +#~ msgstr "Mostrar Nombre" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" diff --git a/project_template/i18n/fr.po b/project_template/i18n/fr.po new file mode 100644 index 0000000000..b27e7c5b18 --- /dev/null +++ b/project_template/i18n/fr.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-04 16:46+0000\n" +"Last-Translator: Yves Le Doeuff \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 4.3.2\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Créer un projet depuis le modèle" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Créer un projet depuis le modèle" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Est un modèle" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Est un modèle ?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "N'est pas un modèle" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projet" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Modèles" + +#, fuzzy +#~ msgid "WBS element" +#~ msgstr "Élément SDP" diff --git a/project_template/i18n/fr_FR.po b/project_template/i18n/fr_FR.po new file mode 100644 index 0000000000..5c3fd33d46 --- /dev/null +++ b/project_template/i18n/fr_FR.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-11 16:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr_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 4.3.2\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Créer un projet depuis le modèle" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Créer un projet depuis le modèle" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Est un modèle" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Est un modèle ?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "N'est pas un modèle" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projet" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Modèles" diff --git a/project_template/i18n/he.po b/project_template/i18n/he.po new file mode 100644 index 0000000000..b13aa811cf --- /dev/null +++ b/project_template/i18n/he.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-10-19 07:08+0000\n" +"Last-Translator: Yves Goldberg \n" +"Language-Team: none\n" +"Language: he\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " +"n % 10 == 0) ? 2 : 3));\n" +"X-Generator: Weblate 3.10\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "צור תיק על פי תבנית" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "צור תיק על פי תבנית" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "האם תבנית" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "האם תבנית?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "ללא תבנית" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "פרויקט" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "תבניות" diff --git a/project_template/i18n/hr.po b/project_template/i18n/hr.po new file mode 100644 index 0000000000..c1f7509714 --- /dev/null +++ b/project_template/i18n/hr.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-01-04 02:42+0000\n" +"Last-Translator: Bole \n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Stvori projekt iz predloška" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Stvori projekt iz predloška" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Je predložak" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Je predložak?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Nisu predlošci" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projekt" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Predlošci" diff --git a/project_template/i18n/it.po b/project_template/i18n/it.po new file mode 100644 index 0000000000..9dc35f882d --- /dev/null +++ b/project_template/i18n/it.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-04-10 21:22+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\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 4.14.1\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Crea progetto da modello" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Crea progetto da modello" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "È un modello" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "È un modello?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Non modelli" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Progetto" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Modelli" + +#~ msgid "WBS element" +#~ msgstr "Elemento WBS" diff --git a/project_template/i18n/nl.po b/project_template/i18n/nl.po new file mode 100644 index 0000000000..80fe988eeb --- /dev/null +++ b/project_template/i18n/nl.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-09 02:52+0000\n" +"Last-Translator: \"Jan Tapper [Onestein]\" \n" +"Language-Team: none\n" +"Language: nl\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 4.17\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Project maken op basis van sjabloon" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Project maken op basis van sjabloon" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Is een sjabloon" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Is een sjabloon?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Geen sjablonen" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Sjablonen" diff --git a/project_template/i18n/project_template.pot b/project_template/i18n/project_template.pot new file mode 100644 index 0000000000..a195861104 --- /dev/null +++ b/project_template/i18n/project_template.pot @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "" diff --git a/project_template/i18n/pt.po b/project_template/i18n/pt.po new file mode 100644 index 0000000000..799a42affa --- /dev/null +++ b/project_template/i18n/pt.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-01-10 13:13+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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.10\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Criar Projeto a Partir de Modelo" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Criar Projeto a partir de Modelo" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "É um Modelo" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "É um Modelo?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Não-Modelos" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Modelos" + +#~ msgid "WBS element" +#~ msgstr "Elemento WBS" diff --git a/project_template/i18n/pt_BR.po b/project_template/i18n/pt_BR.po new file mode 100644 index 0000000000..d6a9b6dd50 --- /dev/null +++ b/project_template/i18n/pt_BR.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-31 13:10+0000\n" +"Last-Translator: Adriano Prado \n" +"Language-Team: none\n" +"Language: pt_BR\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 4.17\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Criar Projeto a Partir do Modelo" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Criar Projeto a Partir do Modelo" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "É um Modelo" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "É um Modelo?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Não é Modelo" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projeto" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Modelos" diff --git a/project_template/i18n/sl.po b/project_template/i18n/sl.po new file mode 100644 index 0000000000..ffbfe9dc73 --- /dev/null +++ b/project_template/i18n/sl.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-31 10:13+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Ustvari projekt iz predloge" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Ustvari projekt iz predloge" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Je predloga" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Je predloga?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Niso predloge" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Predloge" + +#~ msgid "WBS element" +#~ msgstr "Projektni člen" diff --git a/project_template/i18n/sv.po b/project_template/i18n/sv.po new file mode 100644 index 0000000000..5119fa0b49 --- /dev/null +++ b/project_template/i18n/sv.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_template +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-16 10:36+0000\n" +"Last-Translator: Simon S \n" +"Language-Team: none\n" +"Language: sv\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 4.3.2\n" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Create Project From Template" +msgstr "Skapa projekt från mall" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Skapa projekt från mall" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__is_template +msgid "Is Template" +msgstr "Är mall" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_form +msgid "Is Template?" +msgstr "Är mall?" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Non-Templates" +msgstr "Icke-mallar" + +#. module: project_template +#: model:ir.model,name:project_template.model_project_project +msgid "Project" +msgstr "Projekt" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_search +msgid "Templates" +msgstr "Mallar" + +#~ msgid "Display Name" +#~ msgstr "Visningsnamn" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Senast ändrad den" diff --git a/project_template/models/__init__.py b/project_template/models/__init__.py new file mode 100644 index 0000000000..6a689f5d02 --- /dev/null +++ b/project_template/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import project diff --git a/project_template/models/project.py b/project_template/models/project.py new file mode 100644 index 0000000000..4f8c6437eb --- /dev/null +++ b/project_template/models/project.py @@ -0,0 +1,60 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + +# See _map_tasks_default_valeus +TASK_DEFAULT_COPY_CONTEXT_KEY = f"{__name__}.task_default_copy_context_key" + + +class Project(models.Model): + _inherit = "project.project" + + is_template = fields.Boolean(copy=False) + + # CREATE A PROJECT FROM A TEMPLATE AND OPEN THE NEWLY CREATED PROJECT + def create_project_from_template(self): + if " (TEMPLATE)" in self.name: + new_name = self.name.replace(" (TEMPLATE)", " (COPY)") + else: + new_name = self.name + " (COPY)" + new_project = self.with_context(**{TASK_DEFAULT_COPY_CONTEXT_KEY: True}).copy( + default={"name": new_name, "active": True, "alias_name": False} + ) + + # OPEN THE NEWLY CREATED PROJECT FORM + return { + "view_type": "form", + "view_mode": "form", + "res_model": "project.project", + "target": "current", + "res_id": new_project.id, + "type": "ir.actions.act_window", + } + + @api.model + def _map_tasks_default_valeus(self, task, project): + defaults = super()._map_tasks_default_valeus(task, project) + if self.env.context.get(TASK_DEFAULT_COPY_CONTEXT_KEY): + # date_end normally is not copied on tasks when a project is + # copied, but we want it when generating from template + defaults["date_end"] = task.date_end + return defaults + + # ADD "(TEMPLATE)" TO THE NAME WHEN PROJECT IS MARKED AS A TEMPLATE + @api.onchange("is_template") + def on_change_is_template(self): + # Add "(TEMPLATE)" to the Name if is_template == true + # if self.name is needed for creating projects via configuration menu + if self.name: + if self.is_template: + if "(TEMPLATE)" not in self.name: + self.name = self.name + " (TEMPLATE)" + if self.user_id: + self.user_id = False + if self.partner_id: + self.partner_id = False + if self.alias_name: + self.alias_name = False + + else: + if " (TEMPLATE)" in self.name: + self.name = self.name.replace(" (TEMPLATE)", "") diff --git a/project_template/pyproject.toml b/project_template/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/project_template/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/project_template/readme/CONTRIBUTORS.md b/project_template/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..9d9495b8ab --- /dev/null +++ b/project_template/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Patrick Wilson \<\> +- Alfadil Mustafa \<\> +- Mantas Šniukas \<\> diff --git a/project_template/readme/DESCRIPTION.md b/project_template/readme/DESCRIPTION.md new file mode 100644 index 0000000000..6d1a92a25a --- /dev/null +++ b/project_template/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds templates for projects. diff --git a/project_template/readme/USAGE.md b/project_template/readme/USAGE.md new file mode 100644 index 0000000000..b0fd138be5 --- /dev/null +++ b/project_template/readme/USAGE.md @@ -0,0 +1,10 @@ +To use this module, you need to: + +1. Have Manager rights for Project group to edit projects and project + templates. +2. Convert project to a project template by setting the "Is Template?" + field on any project. +3. View Templates via the Template filter. +4. Use the "Create Project from Template" link in the drop down menu on + each template while in the Kanban view or the button on the project + template form. diff --git a/project_template/static/description/icon.png b/project_template/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/project_template/static/description/icon.png differ diff --git a/project_template/static/description/index.html b/project_template/static/description/index.html new file mode 100644 index 0000000000..cc1667ce73 --- /dev/null +++ b/project_template/static/description/index.html @@ -0,0 +1,439 @@ + + + + + +Project Templates + + + +
+

Project Templates

+ + +

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

+

This module adds templates for projects.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Have Manager rights for Project group to edit projects and project +templates.
  2. +
  3. Convert project to a project template by setting the “Is Template?” +field on any project.
  4. +
  5. View Templates via the Template filter.
  6. +
  7. Use the “Create Project from Template” link in the drop down menu on +each template while in the Kanban view or the button on the project +template form.
  8. +
+
+
+

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

+
    +
  • Patrick Wilson
  • +
+
+
+

Contributors

+ +
+
+

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 maintainer:

+

patrickrwilson

+

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

+

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

+
+
+
+ + diff --git a/project_template/tests/__init__.py b/project_template/tests/__init__.py new file mode 100644 index 0000000000..16f937a422 --- /dev/null +++ b/project_template/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_project_template diff --git a/project_template/tests/test_project_template.py b/project_template/tests/test_project_template.py new file mode 100644 index 0000000000..9a56c25f31 --- /dev/null +++ b/project_template/tests/test_project_template.py @@ -0,0 +1,96 @@ +# Copyright 2019 Patrick Wilson +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from datetime import datetime, timedelta + +from odoo.tests import common + + +class TestProjectTemplate(common.TransactionCase): + def setUp(self): + super().setUp() + self.test_customer = self.env["res.partner"].create({"name": "TestCustomer"}) + self.test_project = self.env["project.project"].create( + { + "name": "TestProject", + "alias_name": "test_alias", + "partner_id": self.test_customer.id, + } + ) + self.tasks = [ + self.env["project.task"].create( + {"name": "TestTask", "project_id": self.test_project.id} + ), + self.env["project.task"].create( + {"name": "TestTask2", "project_id": self.test_project.id} + ), + ] + + # TEST 01: Set project to be a template and test name change + def test_on_change_is_template(self): + # Test when changing project to a template + project_01 = self.test_project + project_01.is_template = True + project_01.on_change_is_template() + self.assertEqual(project_01.name, "TestProject (TEMPLATE)") + + # Test when changing template back to project + project_01.is_template = False + project_01.on_change_is_template() + self.assertEqual(project_01.name, "TestProject") + + # TEST 02: Create project from template + def test_create_project_from_template(self): + # Set Project Template + project_01 = self.test_project + project_01.is_template = True + project_01.on_change_is_template() + + # Create new Project from Template + project_01.create_project_from_template() + new_project = self.env["project.project"].search( + [("name", "=", "TestProject (COPY)")] + ) + self.assertEqual(len(new_project), 1) + + # TEST 03: Create project from template using non-standard name + def test_create_project_from_template_non_standard_name(self): + # Set Project Template + project_01 = self.test_project + project_01.is_template = True + project_01.on_change_is_template() + # Change the name of project template + project_01.name = "TestProject(TEST)" + + # Create new Project from Template + project_01.create_project_from_template() + new_project = self.env["project.project"].search( + [("name", "=", "TestProject(TEST) (COPY)")] + ) + self.assertEqual(len(new_project), 1) + + def test_create_project_from_template_duplicate_task_names(self): + project_01 = self.test_project + project_01.is_template = True + project_01.on_change_is_template() + # Set the same name on all tasks + dates = set() + now = datetime.now() + for i, task in enumerate(self.tasks): + date = now - timedelta(weeks=i) + task.name = "Same for all tasks" + dates.add(date) + task.date_end = date + + # Create new Project from Template + project_01.create_project_from_template() + new_project = self.env["project.project"].search( + [("name", "=", "TestProject (COPY)")] + ) + self.assertEqual(len(new_project), 1) + new_tasks = self.env["project.task"].search( + [ + ("project_id", "=", new_project.id), + ] + ) + self.assertEqual(len(new_tasks), len(self.tasks)) + self.assertEqual(set(new_tasks.mapped("date_end")), dates) diff --git a/project_template/views/project.xml b/project_template/views/project.xml new file mode 100644 index 0000000000..add0cf1daf --- /dev/null +++ b/project_template/views/project.xml @@ -0,0 +1,73 @@ + + + + project.template.form + project.project + + form + + +