diff --git a/project_template/README.rst b/project_template/README.rst new file mode 100644 index 0000000000..b04036f22a --- /dev/null +++ b/project_template/README.rst @@ -0,0 +1,93 @@ +================= +Project Templates +================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fproject-lightgray.png?logo=github + :target: https://github.com/OCA/project/tree/15.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-15-0/project-15-0-project_template + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/140/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds templates for projects. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Have Manager rights for Project group to edit projects and project templates. +#. Convert project to a project template by setting the "Is Template?" field on any project. +#. View Templates via the Template filter. +#. 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 smashing 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..00af7722ae --- /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": "16.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..a586f82cdc --- /dev/null +++ b/project_template/i18n/de.po @@ -0,0 +1,67 @@ +# 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-08-18 19:49+0000\n" +"Last-Translator: Álvaro Estébanez \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.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 "Projekterstellung aus dieser Vorlage" + +#. module: project_template +#: model_terms:ir.ui.view,arch_db:project_template.project_template_view_inherit_kanban +msgid "Create Project from Template" +msgstr "Projekterstellung aus dieser Vorlage" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__id +msgid "ID" +msgstr "ID" + +#. 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:ir.model.fields,field_description:project_template.field_project_project____last_update +msgid "Last Modified on" +msgstr "Letzte Änderung am" + +#. 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" 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..020adcd3c9 --- /dev/null +++ b/project_template/i18n/es_AR.po @@ -0,0 +1,67 @@ +# 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__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__id +msgid "ID" +msgstr "ID" + +#. 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:ir.model.fields,field_description:project_template.field_project_project____last_update +msgid "Last Modified on" +msgstr "Última Modificación el" + +#. 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" 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..0d7dd4a0a7 --- /dev/null +++ b/project_template/i18n/fr_FR.po @@ -0,0 +1,67 @@ +# 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__display_name +msgid "Display Name" +msgstr "" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__id +msgid "ID" +msgstr "" + +#. 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:ir.model.fields,field_description:project_template.field_project_project____last_update +msgid "Last Modified on" +msgstr "" + +#. 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/it.po b/project_template/i18n/it.po new file mode 100644 index 0000000000..fecf37f21f --- /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: 2020-05-31 10:09+0000\n" +"Last-Translator: Sergio Zanchetta \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 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 "" + +#~ msgid "WBS element" +#~ msgstr "Elemento WBS" diff --git a/project_template/i18n/project_template.pot b/project_template/i18n/project_template.pot new file mode 100644 index 0000000000..a08890db28 --- /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 15.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/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..673e5bd7be --- /dev/null +++ b/project_template/i18n/sv.po @@ -0,0 +1,67 @@ +# 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__display_name +msgid "Display Name" +msgstr "Visningsnamn" + +#. module: project_template +#: model:ir.model.fields,field_description:project_template.field_project_project__id +msgid "ID" +msgstr "ID" + +#. 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:ir.model.fields,field_description:project_template.field_project_project____last_update +msgid "Last Modified on" +msgstr "Senast ändrad den" + +#. 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" 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..f24b5113e2 --- /dev/null +++ b/project_template/models/project.py @@ -0,0 +1,55 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +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.copy( + default={"name": new_name, "active": True, "alias_name": False} + ) + + # SINCE THE END DATE DOESN'T COPY OVER ON TASKS + # (Even when changed to copy=true), POPULATE END DATES ON THE TASK + for new_task_record in new_project.task_ids: + for old_task_record in self.task_ids: + if new_task_record.name == old_task_record.name: + new_task_record.date_end = old_task_record.date_end + + # 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", + } + + # 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/readme/CONTRIBUTORS.rst b/project_template/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..685c5458c7 --- /dev/null +++ b/project_template/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Patrick Wilson +* Alfadil Mustafa +* Mantas Šniukas diff --git a/project_template/readme/DESCRIPTION.rst b/project_template/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..6d1a92a25a --- /dev/null +++ b/project_template/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds templates for projects. diff --git a/project_template/readme/USAGE.rst b/project_template/readme/USAGE.rst new file mode 100644 index 0000000000..f9a513f940 --- /dev/null +++ b/project_template/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +#. Have Manager rights for Project group to edit projects and project templates. +#. Convert project to a project template by setting the "Is Template?" field on any project. +#. View Templates via the Template filter. +#. 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..8f480d8182 --- /dev/null +++ b/project_template/static/description/index.html @@ -0,0 +1,434 @@ + + + + + + +Project Templates + + + +
+

Project Templates

+ + +

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

+

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 smashing 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..c6a17bb209 --- /dev/null +++ b/project_template/tests/test_project_template.py @@ -0,0 +1,63 @@ +# Copyright 2019 Patrick Wilson +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +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.env["project.task"].create( + {"name": "TestTask", "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) diff --git a/project_template/views/project.xml b/project_template/views/project.xml new file mode 100644 index 0000000000..54a3363fc1 --- /dev/null +++ b/project_template/views/project.xml @@ -0,0 +1,73 @@ + + + + project.template.form + project.project + + form + + +