-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG][16.0] project_task_ressource_type
- Loading branch information
Showing
16 changed files
with
339 additions
and
0 deletions.
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
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,35 @@ | ||
================================ | ||
Project Task Resource Type | ||
================================ | ||
This module adds a new model for Resources and a field to associate resources with tasks. | ||
|
||
Resources can be defined in **Project > Configuration > Resources**. | ||
|
||
.. image:: static/description/menu.png | ||
:alt: Resource Menu | ||
:align: center | ||
|
||
From there, you can create a new resource type: | ||
|
||
.. image:: static/description/resource_form_view.png | ||
:alt: Resource Form View | ||
:align: center | ||
|
||
Once a resource type is created, you can assign it to a task: | ||
|
||
.. image:: static/description/task_form_view.png | ||
:alt: Task Form View | ||
:align: center | ||
|
||
Usage | ||
----- | ||
* Navigate to **Projects / Configuration / Resources** to define a resource type. | ||
* Create a new resource type and assign it to tasks through the task form. | ||
|
||
Contributors | ||
------------ | ||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
|
||
More Information | ||
---------------- | ||
* Meet us at https://bit.ly/numigi-com |
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 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
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,22 @@ | ||
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
Check warning on line 4 in project_task_resource_type/__manifest__.py Codacy Production / Codacy Static Code Analysisproject_task_resource_type/__manifest__.py#L4
|
||
"name": "Project Task Resource Type", | ||
"version": "16.0.1.0.0", | ||
"description": "Add the referentiel Resource and the field to the tasks.", | ||
"author": "Numigi", | ||
"maintainer": "Numigi", | ||
"website": "https://bit.ly/numigi-com", | ||
"license": "LGPL-3", | ||
"category": "Project", | ||
"depends": ["project"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/project_resource_views.xml", | ||
"views/project_task_views.xml", | ||
], | ||
"application": False, | ||
"license": "LGPL-3", | ||
"installable": True, | ||
} |
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,178 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_resource_type | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-26 11:32+0000\n" | ||
"PO-Revision-Date: 2024-11-26 11:32+0000\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_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_needaction | ||
msgid "Action Needed" | ||
msgstr "Nécessite une action" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_attachment_count | ||
msgid "Attachment Count" | ||
msgstr "Nombre de pièces jointes" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__create_uid | ||
msgid "Created by" | ||
msgstr "Crée par" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__create_date | ||
msgid "Created on" | ||
msgstr "Créé le" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__display_name | ||
msgid "Display Name" | ||
msgstr "Nom d'affichage" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_follower_ids | ||
msgid "Followers" | ||
msgstr "Abonnés" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_partner_ids | ||
msgid "Followers (Partners)" | ||
msgstr "Abonnés (Partenaires)" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__has_message | ||
msgid "Has Message" | ||
msgstr "A un message" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__message_needaction | ||
msgid "If checked, new messages require your attention." | ||
msgstr "Si coché, de nouveaux messages demandent votre attention." | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__message_has_error | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__message_has_sms_error | ||
msgid "If checked, some messages have a delivery error." | ||
msgstr "Si coché, certains messages ont une erreur de livraison." | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_is_follower | ||
msgid "Is Follower" | ||
msgstr "Est un abonné" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource____last_update | ||
msgid "Last Modified on" | ||
msgstr "Dernière modification le" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__write_uid | ||
msgid "Last Updated by" | ||
msgstr "Dernière mise à jour par" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__write_date | ||
msgid "Last Updated on" | ||
msgstr "Dernière mise à jour le" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_main_attachment_id | ||
msgid "Main Attachment" | ||
msgstr "Pièce jointe principale" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_has_error | ||
msgid "Message Delivery error" | ||
msgstr "Erreur d'envoi du message" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_ids | ||
msgid "Messages" | ||
msgstr "" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__name | ||
msgid "Name" | ||
msgstr "Nom" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_needaction_counter | ||
msgid "Number of Actions" | ||
msgstr "Nombre d'actions" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_has_error_counter | ||
msgid "Number of errors" | ||
msgstr "Nombre d'erreurs" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__message_needaction_counter | ||
msgid "Number of messages requiring action" | ||
msgstr "Nombre de messages nécessitant une action" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__message_has_error_counter | ||
msgid "Number of messages with delivery error" | ||
msgstr "Nombre de messages avec des erreurs d'envoi" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model,name:project_task_resource_type.model_project_resource | ||
msgid "Project Resource" | ||
msgstr "" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_task__resource_id | ||
msgid "Resource" | ||
msgstr "Ressource" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.actions.act_window,name:project_task_resource_type.action_project_resource | ||
msgid "Resources" | ||
msgstr "Ressources" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__message_has_sms_error | ||
msgid "SMS Delivery error" | ||
msgstr "Erreur d'envoi SMS" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model,name:project_task_resource_type.model_project_task | ||
msgid "Task" | ||
msgstr "Tâche" | ||
|
||
#. module: project_task_resource_type | ||
#: model_terms:ir.ui.view,arch_db:project_task_resource_type.project_resource_form | ||
msgid "Task Resource" | ||
msgstr "Ressource de tâche" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.ui.menu,name:project_task_resource_type.task_resources | ||
#: model_terms:ir.ui.view,arch_db:project_task_resource_type.project_resource_tree | ||
msgid "Task Resources" | ||
msgstr "Ressources de tâches" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,field_description:project_task_resource_type.field_project_resource__website_message_ids | ||
msgid "Website Messages" | ||
msgstr "Messages du site web" | ||
|
||
#. module: project_task_resource_type | ||
#: model:ir.model.fields,help:project_task_resource_type.field_project_resource__website_message_ids | ||
msgid "Website communication history" | ||
msgstr "Historique de communication du site web" |
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,5 @@ | ||
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import project_resource | ||
from . import project_task | ||
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,12 @@ | ||
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class ProjectResource(models.Model): | ||
_name = "project.resource" | ||
_inherit = ["mail.thread"] | ||
_description = "Project Resource" | ||
|
||
name = fields.Char(string="Name") |
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,10 @@ | ||
# Copyright 2024 Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class ProjectTask(models.Model): | ||
_inherit = "project.task" | ||
|
||
resource_id = fields.Many2one("project.resource") |
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,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_project_resource,access_project_resource,model_project_resource,base.group_user,1,0,0,0 | ||
access_project_resource_admin,access_project_resource,model_project_resource,project.group_project_manager,1,1,1,1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
project_task_resource_type/views/project_resource_views.xml
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,43 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<record id="project_resource_form" model="ir.ui.view"> | ||
<field name="model">project.resource</field> | ||
<field name="arch" type="xml"> | ||
<form string="Task Resource"> | ||
<sheet> | ||
<div class="oe_title"> | ||
<label for="name" class="oe_edit_only"/> | ||
<h1> | ||
<field name="name"/> | ||
</h1> | ||
</div> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="project_resource_tree" model="ir.ui.view"> | ||
<field name="model">project.resource</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Task Resources"> | ||
<field name="name"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="action_project_resource" model="ir.actions.act_window"> | ||
<field name="name">Resources</field> | ||
<field name="res_model">project.resource</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
|
||
<menuitem | ||
name="Task Resources" | ||
id="task_resources" | ||
parent="project.menu_project_config" | ||
action="action_project_resource" | ||
sequence="2" | ||
/> | ||
|
||
</odoo> |
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> | ||
|
||
<record id="view_task_form2" model="ir.ui.view"> | ||
<field name="model">project.task</field> | ||
<field name="inherit_id" ref="project.view_task_form2"/> | ||
<field name="arch" type="xml"> | ||
<field name="date_deadline" position="after"> | ||
<field name="resource_id"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_task_search_form" model="ir.ui.view"> | ||
<field name="name">Task Search: allow to search by resource</field> | ||
<field name="model">project.task</field> | ||
<field name="inherit_id" ref="project.view_task_search_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="stage_id" position="after"> | ||
<field name="resource_id"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |