Skip to content

Commit bf8c703

Browse files
mpascuallBernatObrador
authored andcommitted
[ADD] project_fte: New module project_fte
1 parent d63d795 commit bf8c703

29 files changed

+3950
-0
lines changed

project_fte/README.rst

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
===========
2+
Project FTE
3+
===========
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:d8ef4ec8928d52ddb634db27233ca9976fbf0cdd4248ba156695645608db333a
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
20+
:target: https://github.com/OCA/project/tree/17.0/project_fte
21+
:alt: OCA/project
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_fte
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
With this module you can manage FTE (Full-Time Equivalent) contracts and
32+
evolution in projects.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Usage
40+
=====
41+
42+
1. **Go to the desired project**, click the three dots (⋯) in the
43+
top-right corner, and select **Settings**.
44+
2. A new section named **FTE** will appear in the project form.
45+
3. Click the **Generate FTE Lines** button to open the wizard.
46+
47+
🔧 In the wizard:
48+
~~~~~~~~~~~~~~~~~
49+
50+
- Select the **Start Date**. This date will be stored on the project.
51+
- **total FTE hours** will be calculated from the total of the
52+
allocated_hours of the tasks.
53+
- Fill in the **Monthly Hours** manually. These represent the typical
54+
number of hours to distribute per month, and are used to calculate
55+
the duration.
56+
- Define the **Profile Distribution** by selecting the roles and
57+
specifying the number of hours per role.
58+
59+
..
60+
61+
💡 If your roles have a **Price per Hour** defined (on the role
62+
itself), the wizard will use it to compute the cost of each role’s
63+
hours.
64+
65+
- The wizard will automatically compute:
66+
67+
- The **percentage** of each role's hours,
68+
- The **Monthly Amount** and **Total Amount**,
69+
- The **End Date**, based on the total hours and monthly
70+
distribution.
71+
72+
--------------
73+
74+
🎯 Autofill from Milestones
75+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
76+
77+
Instead of filling the profile distribution manually, you can click
78+
**Load from Milestones**:
79+
80+
- This will gather all project tasks linked to milestones,
81+
- And group their allocated hours by the **role assigned to each
82+
milestone**,
83+
- Creating a profile distribution automatically.
84+
85+
This is useful when project planning has already been done using
86+
milestones.
87+
88+
--------------
89+
90+
📆 Generating the Lines
91+
~~~~~~~~~~~~~~~~~~~~~~~
92+
93+
Once all fields are filled:
94+
95+
1. Click **Generate**.
96+
2. FTE lines will be created month by month from the selected Start Date
97+
to the computed End Date.
98+
3. The hours and costs are distributed according to the profile
99+
distribution.
100+
101+
--------------
102+
103+
Bug Tracker
104+
===========
105+
106+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
107+
In case of trouble, please check there if your issue has already been reported.
108+
If you spotted it first, help us to smash it by providing a detailed and welcomed
109+
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_fte%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
110+
111+
Do not contact contributors directly about support or help with technical issues.
112+
113+
Credits
114+
=======
115+
116+
Authors
117+
-------
118+
119+
* APSL Nagarro
120+
121+
Contributors
122+
------------
123+
124+
- ``APSL-Nagarro <https://apsl.tech>``\ \_:
125+
126+
- Miquel Alzanillas [email protected]
127+
- Miquel Pascual [email protected]
128+
- Bernat Obrador [email protected]
129+
130+
Maintainers
131+
-----------
132+
133+
This module is maintained by the OCA.
134+
135+
.. image:: https://odoo-community.org/logo.png
136+
:alt: Odoo Community Association
137+
:target: https://odoo-community.org
138+
139+
OCA, or the Odoo Community Association, is a nonprofit organization whose
140+
mission is to support the collaborative development of Odoo features and
141+
promote its widespread use.
142+
143+
.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px
144+
:target: https://github.com/miquelalzanillas
145+
:alt: miquelalzanillas
146+
.. |maintainer-mpascuall| image:: https://github.com/mpascuall.png?size=40px
147+
:target: https://github.com/mpascuall
148+
:alt: mpascuall
149+
150+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
151+
152+
|maintainer-miquelalzanillas| |maintainer-mpascuall|
153+
154+
This module is part of the `OCA/project <https://github.com/OCA/project/tree/17.0/project_fte>`_ project on GitHub.
155+
156+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

project_fte/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from . import wizard

project_fte/__manifest__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2025 APSL Nagarro
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Project FTE",
6+
"summary": "Manage FTE (Full-Time Equivalent) contracts and evolution in projects.",
7+
"version": "17.0.1.0.0",
8+
"category": "Project",
9+
"website": "https://github.com/OCA/project",
10+
"author": "APSL Nagarro, Odoo Community Association (OCA)",
11+
"maintainers": ["miquelalzanillas", "mpascuall"],
12+
"license": "AGPL-3",
13+
"application": False,
14+
"installable": True,
15+
"depends": [
16+
"project",
17+
"project_role",
18+
"hr_timesheet",
19+
"hr_timesheet_type_non_billable",
20+
],
21+
"data": [
22+
"security/ir.model.access.csv",
23+
"data/templates/mail_template.xml",
24+
"data/ir_cron.xml",
25+
"wizard/project_fte_mass_generator_views.xml",
26+
"views/project_fte_month_line_views.xml",
27+
"views/project_project_views.xml",
28+
"views/project_role.xml",
29+
"views/project_milestone.xml",
30+
],
31+
}

project_fte/data/ir_cron.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<odoo>
2+
<record id="ir_cron_check_fte_execution" model="ir.cron">
3+
<field name="name">FTE Execution Monitoring</field>
4+
<field name="model_id" ref="project_fte.model_project_fte_month_line" />
5+
<field name="state">code</field>
6+
<field name="code">model._cron_check_fte_execution()</field>
7+
<field name="interval_number">1</field>
8+
<field name="interval_type">days</field>
9+
<field name="numbercall">-1</field>
10+
<field name="active" eval="True" />
11+
</record>
12+
</odoo>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
4+
<!-- Template: FTE Execution Warning -->
5+
<record id="mail_template_fte_execution_warning" model="mail.template">
6+
<field name="name">FTE Execution Warning</field>
7+
<field name="model_id" ref="project_fte.model_project_fte_month_line" />
8+
<field name="subject">⚠ FTE Execution Alert: {{object.project_id.name}}</field>
9+
<field name="email_from">{{object.project_id.company_id.email or ''}}</field>
10+
<field name="email_to">{{object.project_id.user_id.email}}</field>
11+
<field name="lang">{{object.project_id.user_id.lang}}</field>
12+
<field name="body_html">
13+
<![CDATA[
14+
<t t-set="project_id" t-value="object.project_id.id"/>
15+
<div style="font-family: Arial, sans-serif; background-color: #f5f6fa; padding: 40px 20px;">
16+
<div style="max-width: 600px; margin: auto; background: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
17+
18+
<h2 style="color: #dc3545;">⚠ Low FTE Execution</h2>
19+
20+
<p style="font-size: 15px; color: #333333;">Dear <strong><t t-out="object.project_id.user_id.name or 'User'"/></strong>,</p>
21+
22+
<p style="font-size: 15px; color: #333;">
23+
The FTE execution for project <strong><t t-out="object.project_id.name"/></strong>
24+
in <strong><t t-out="object.month"/>/<t t-out="object.year"/></strong> is:
25+
</p>
26+
27+
<ul style="font-size: 15px; color: #333; padding-left: 20px; margin: 0 0 10px 0;">
28+
<li><strong><t t-out="round(object.fte_hours, 2)"/></strong> expected hours</li>
29+
<li><strong><t t-out="round(object.executed_hours, 2)"/></strong> hours executed</li>
30+
<li><strong><t t-out="round(object.executed_percent)"/>%</strong> of execution</li>
31+
</ul>
32+
33+
<p style="font-size: 15px;">This is below the expected progress. Please review the execution and make sure timesheets are properly filled in.</p>
34+
35+
<div style="margin: 30px 0; text-align: center;">
36+
<a t-att-href="'/web#id=%s&model=project.project&view_type=form' % project_id"
37+
style="background-color: #007BFF; color: white; padding: 12px 25px; text-decoration: none; border-radius: 6px; display: inline-block;">
38+
🔍 View Project
39+
</a>
40+
</div>
41+
42+
<p style="font-size: 14px; color: #666;">Best regards,<br/>Odoo System</p>
43+
</div>
44+
</div>
45+
]]>
46+
</field>
47+
<field name="auto_delete" eval="True" />
48+
</record>
49+
50+
<!-- Template: FTE Execution Overload Warning -->
51+
<record id="mail_template_fte_execution_overload" model="mail.template">
52+
<field name="name">FTE Execution Overload Warning</field>
53+
<field name="model_id" ref="project_fte.model_project_fte_month_line" />
54+
<field name="subject">⚠ Excess FTE Execution: {{object.project_id.name}}</field>
55+
<field name="email_from">{{object.project_id.company_id.email or ''}}</field>
56+
<field name="email_to">{{object.project_id.user_id.email}}</field>
57+
<field name="lang">{{object.project_id.user_id.lang}}</field>
58+
<field name="body_html">
59+
<![CDATA[
60+
<t t-set="project_id" t-value="object.project_id.id"/>
61+
<div style="font-family: Arial, sans-serif; background-color: #f5f6fa; padding: 40px 20px;">
62+
<div style="max-width: 600px; margin: auto; background: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
63+
64+
<h2 style="color: #c82333;">⚠ Excessive FTE Execution</h2>
65+
66+
<p style="font-size: 15px; color: #333333;">Dear <strong><t t-out="object.project_id.user_id.name or 'User'"/></strong>,</p>
67+
68+
<p style="font-size: 15px; color: #333;">
69+
The FTE execution for project <strong><t t-out="object.project_id.name"/></strong>
70+
in <strong><t t-out="object.month"/>/<t t-out="object.year"/></strong> is:
71+
</p>
72+
73+
<ul style="font-size: 15px; color: #333; padding-left: 20px; margin: 0 0 10px 0;">
74+
<li><strong><t t-out="round(object.fte_hours, 2)"/></strong> expected hours</li>
75+
<li><strong><t t-out="round(object.executed_hours, 2)"/></strong> hours executed</li>
76+
<li><strong><t t-out="round(object.executed_percent)"/>%</strong> of execution</li>
77+
</ul>
78+
79+
<p style="font-size: 15px;">This exceeds the expected progress. Please review the timesheets to confirm accurate reporting.</p>
80+
81+
<div style="margin: 30px 0; text-align: center;">
82+
<a t-att-href="'/web#id=%s&model=project.project&view_type=form' % project_id"
83+
style="background-color: #007BFF; color: white; padding: 12px 25px; text-decoration: none; border-radius: 6px; display: inline-block;">
84+
🔍 View Project
85+
</a>
86+
</div>
87+
88+
<p style="font-size: 14px; color: #666;">Best regards,<br/>Odoo System</p>
89+
</div>
90+
</div>
91+
]]>
92+
</field>
93+
<field name="auto_delete" eval="True" />
94+
</record>
95+
96+
</odoo>

0 commit comments

Comments
 (0)