forked from OCA/project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #954 from OCA/14.0
Syncing from upstream OCA/project (14.0)
- Loading branch information
Showing
26 changed files
with
1,325 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
====================== | ||
Project Task Templates | ||
====================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:7fa1f9f57e535d5cc7bc336e9f0169353824dafa1ee4bdd72bc80894835343e5 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/14.0/project_task_description_template | ||
:alt: OCA/project | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_task_description_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=14.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
The goal of this module is to allow templates for task descriptions. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Follow these steps to use the module: | ||
|
||
**Create task template** | ||
|
||
- Go to **Project -> Configuration -> Task Template**. | ||
- Create desired task templates and configure them according to your | ||
project needs. | ||
|
||
**Assign Templates to Projects** | ||
|
||
- Go to the specific project to which a template should be assigned. | ||
Open the Settings tab. | ||
- In the Task Template dropdown, select created templates. | ||
- In the field Available in, select the product stages where this | ||
templates will be available | ||
|
||
**Create task** | ||
|
||
- Create a new task within the project. | ||
- The task template will be available to set up in the stage configured | ||
for the task template. | ||
- Select the desired template from the Task Template field. | ||
- Fields will automatically be populated with values from the selected | ||
template. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/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 <https://github.com/OCA/project/issues/new?body=module:%20project_task_description_template%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* Cetmix | ||
|
||
Contributors | ||
------------ | ||
|
||
- Cetmix <cetmix.com/> | ||
|
||
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-aleuffre| image:: https://github.com/aleuffre.png?size=40px | ||
:target: https://github.com/aleuffre | ||
:alt: aleuffre | ||
.. |maintainer-renda-dev| image:: https://github.com/renda-dev.png?size=40px | ||
:target: https://github.com/renda-dev | ||
:alt: renda-dev | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-aleuffre| |maintainer-renda-dev| | ||
|
||
This module is part of the `OCA/project <https://github.com/OCA/project/tree/14.0/project_task_description_template>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (C) 2023 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (C) 2023 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
||
{ | ||
"name": "Project Task Templates", | ||
"version": "14.0.1.0.0", | ||
"summary": "Module for Task Templates", | ||
"author": "Cetmix, Odoo Community Association (OCA)", | ||
"category": "Project", | ||
"maintainers": ["aleuffre", "renda-dev"], | ||
"website": "https://github.com/OCA/project", | ||
"license": "AGPL-3", | ||
"depends": ["project"], | ||
"demo": [ | ||
"data/demo.xml", | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/project_task_template_views.xml", | ||
"views/project_views.xml", | ||
"views/assets.xml", | ||
], | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
<record id="template_1_demo" model="project.task.template"> | ||
<field name="name">Template demo 1</field> | ||
<field | ||
name="tag_ids" | ||
eval="[(6, 0, [ | ||
ref('project.project_tags_02')])]" | ||
/> | ||
<field name="user_id" ref="base.user_demo" /> | ||
<field name="description">Template 1 Description!</field> | ||
<field name="project_ids" eval="[(6, 0, [ref('project.project_project_1')])]" /> | ||
</record> | ||
<record id="template_2_demo" model="project.task.template"> | ||
<field name="name">Template demo 2</field> | ||
<field | ||
name="tag_ids" | ||
eval="[(6, 0, [ | ||
ref('project.project_tags_01')])]" | ||
/> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="description">Template 2 Description!</field> | ||
<field name="project_ids" eval="[(6, 0, [ref('project.project_project_2')])]" /> | ||
</record> | ||
</odoo> |
152 changes: 152 additions & 0 deletions
152
project_task_description_template/i18n/project_task_description_template.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_description_template | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.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_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__user_id | ||
#: model_terms:ir.ui.view,arch_db:project_task_description_template.view_task_template_form | ||
msgid "Assigned to" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#. openerp-web | ||
#: code:addons/project_task_description_template/static/src/js/onchange_confirm_widget.js:0 | ||
#, python-format | ||
msgid "Confirmation" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__create_uid | ||
msgid "Created by" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__create_date | ||
msgid "Created on" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__default_task_template_id | ||
msgid "Default Task Template" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__description | ||
#: model_terms:ir.ui.view,arch_db:project_task_description_template.view_task_template_form | ||
msgid "Description" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__display_name | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task__display_name | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__id | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task__id | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model_terms:ir.ui.view,arch_db:project_task_description_template.view_task_template_form | ||
msgid "Information" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project____last_update | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task____last_update | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__write_uid | ||
msgid "Last Updated by" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__write_date | ||
msgid "Last Updated on" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__name | ||
msgid "Name" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__project_ids | ||
msgid "Project" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model,name:project_task_description_template.model_project_task_template | ||
msgid "Project Task Template" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__is_restrict_template_by_stages | ||
msgid "Restrict template by stages" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task_template__tag_ids | ||
msgid "Tag" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model,name:project_task_description_template.model_project_task | ||
msgid "Task" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task__task_template_id | ||
#: model_terms:ir.ui.view,arch_db:project_task_description_template.view_task_form2 | ||
#: model_terms:ir.ui.view,arch_db:project_task_description_template.view_task_template_form | ||
msgid "Task Template" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.actions.act_window,name:project_task_description_template.open_view_task_templates_all | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__task_template_ids | ||
#: model:ir.ui.menu,name:project_task_description_template.menu_projects_config_task_templates | ||
msgid "Task Templates" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_task__template_visible | ||
msgid "Template Visible" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model.fields,field_description:project_task_description_template.field_project_project__template_task_type_ids | ||
msgid "Templates allowed in stages" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#. openerp-web | ||
#: code:addons/project_task_description_template/static/src/js/onchange_confirm_widget.js:0 | ||
#, python-format | ||
msgid "" | ||
"The record has been modified, your changes will be discarded. Do you want to" | ||
" proceed?" | ||
msgstr "" | ||
|
||
#. module: project_task_description_template | ||
#: model:ir.model,name:project_task_description_template.model_project_project | ||
msgid "WBS element" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (C) 2023 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
||
from . import project_task_template | ||
from . import project_project | ||
from . import project_task |
27 changes: 27 additions & 0 deletions
27
project_task_description_template/models/project_project.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (C) 2023 Cetmix OÜ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class ProjectProject(models.Model): | ||
_inherit = "project.project" | ||
|
||
default_task_template_id = fields.Many2one(comodel_name="project.task.template") | ||
task_template_ids = fields.Many2many( | ||
comodel_name="project.task.template", string="Task Templates" | ||
) | ||
template_task_type_ids = fields.Many2many( | ||
string="Templates allowed in stages", comodel_name="project.task.type" | ||
) | ||
is_restrict_template_by_stages = fields.Boolean( | ||
string="Restrict template by stages" | ||
) | ||
|
||
@api.onchange("task_template_ids") | ||
def _onchange_task_template_ids(self): | ||
for record in self: | ||
if record.default_task_template_id and ( | ||
record.default_task_template_id not in record.task_template_ids | ||
): | ||
record.default_task_template_id = False |
Oops, something went wrong.