forked from avanzosc/project-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] project_task_employee (avanzosc#289)
Co-authored-by: Ana Juaristi <ajuaristio@gmail.com>
- Loading branch information
1 parent
0f85065
commit e18b825
Showing
10 changed files
with
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
===================== | ||
Project Task Employee | ||
===================== | ||
|
||
Overview | ||
-------- | ||
|
||
Adds responsible field linking to employee in project tasks. | ||
|
||
Features | ||
-------- | ||
|
||
- Adds a "Responsible" field linking to an employee in project tasks. | ||
- Integrates the field into both form and tree views with optional visibility settings. | ||
|
||
Usage | ||
----- | ||
|
||
Once installed, the `project_task_employee` module will add the "Responsible" field to the Project Task form view and list view (tree view). You can link tasks to employees to designate responsibility. | ||
|
||
Technical Details | ||
----------------- | ||
|
||
- The module extends the `project.task` model to include a Many2one field linking to `hr.employee`. | ||
- Views are modified using XML templates (`project_task_views.xml`) to integrate the new field seamlessly into the Odoo user interface. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Ana Juaristi <anajuaristi@avanzosc.es> | ||
* Unai Beristain <unaiberistain@avanzosc.es> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
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 @@ | ||
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,20 @@ | ||
# Copyright 2024 Unai Beristain - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "project_task_employee", | ||
"version": "14.0.1.0.0", | ||
"summary": "Adds responsible field linking to employee in project tasks.", | ||
"category": "Project", | ||
"author": "Avanzosc", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/avanzosc/project-addons", | ||
"depends": [ | ||
"base", | ||
"project", | ||
], | ||
"data": [ | ||
"views/project_task_views.xml", | ||
], | ||
"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,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_employee | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-07-10 14:57+0000\n" | ||
"PO-Revision-Date: 2024-07-10 14:57+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_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última modificación el" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__responsible_id | ||
msgid "Responsible" | ||
msgstr "Responsable" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model,name:project_task_employee.model_project_task | ||
msgid "Task" | ||
msgstr "Tarea" |
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,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * project_task_employee | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-07-10 14:56+0000\n" | ||
"PO-Revision-Date: 2024-07-10 14:56+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_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model.fields,field_description:project_task_employee.field_project_task__responsible_id | ||
msgid "Responsible" | ||
msgstr "" | ||
|
||
#. module: project_task_employee | ||
#: model:ir.model,name:project_task_employee.model_project_task | ||
msgid "Task" | ||
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 @@ | ||
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,7 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ProjectTask(models.Model): | ||
_inherit = "project.task" | ||
|
||
responsible_id = fields.Many2one("hr.employee", string="Responsible") |
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,23 @@ | ||
<odoo> | ||
<record id="view_task_form_inherit" model="ir.ui.view"> | ||
<field name="name">project.task.form.inherit</field> | ||
<field name="model">project.task</field> | ||
<field name="inherit_id" ref="project.view_task_form2" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='user_id']" position="after"> | ||
<field name="responsible_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="view_task_tree_inherit" model="ir.ui.view"> | ||
<field name="name">project.task.tree.inherit</field> | ||
<field name="model">project.task</field> | ||
<field name="inherit_id" ref="project.view_task_tree2" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//tree" position="inside"> | ||
<field name="responsible_id" optional="show" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
</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 @@ | ||
../../../../project_task_employee |
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 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |