Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TA#72185 [16.0][MIG] project_task_analytic_lines #513

Merged
merged 26 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e48baa0
Init module in 16.0 from 14.0
lanto-razafindrabe Dec 18, 2024
b395c7f
TA#72185 [16.0][MIG] project_task_analytic_lines
lanto-razafindrabe Dec 18, 2024
9771ca7
Update fr.po
lanto-razafindrabe Dec 18, 2024
5e5d90e
[IMP] resolve conflict
abenzbiria Feb 5, 2025
a077a8d
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 5, 2025
1333d08
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 5, 2025
2dea7b1
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
e2ce2d3
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
6b83642
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
7546ba0
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
dc8ad37
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
8de65e9
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
d786627
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
dc5faa3
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
2cc6855
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
b0348eb
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
e31972a
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
a126937
[16.0][MIG] project_task_analytic_lines
abenzbiria Feb 6, 2025
b2568b6
[16.0][MIG] project_task_analytic_lines
rivo2302 Feb 7, 2025
0957237
[16.0][MIG] project_task_analytic_lines
rivo2302 Feb 7, 2025
e24cd93
TA#72185 [16.0][MIG][CHG] project_task_analytic_lines : account_analy…
lanto-razafindrabe Feb 10, 2025
18aa02e
TA#72185 [16.0][MIG][CHG] project_task_analytic_lines : account_move…
lanto-razafindrabe Feb 10, 2025
31971a2
Minor changes
lanto-razafindrabe Feb 10, 2025
18a3bcb
Merge branch '16.0' into TA#72185
lanto-razafindrabe Feb 17, 2025
2f2ac1b
Update account_move_line_views.xml
lanto-razafindrabe Feb 17, 2025
c266fef
Merge branch 'TA#72185' of github.com:Numigi/odoo-project-addons into…
lanto-razafindrabe Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"project_remaining_hours_update",
"project_stage_allow_timesheet",
"project_stage_no_quick_create",
"project_task_analytic_lines",
"project_task_date_planned",
"project_task_deadline_from_project",
"project_task_description_template",
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ COPY project_milestone_spent_hours /mnt/extra-addons/project_milestone_spent_hou
COPY project_milestone_time_kpi /mnt/extra-addons/project_milestone_time_kpi
COPY project_no_quick_create /mnt/extra-addons/project_no_quick_create
COPY project_parent_enhanced mnt/extra-addons/project_parent_enhanced
COPY project_parent_forecasted_end_date mnt/extra-addons/project_parent_forecasted_end_date
COPY project_parent_type_required mnt/extra-addons/project_parent_type_required
COPY project_parent_forecasted_end_date mnt/extra-addons/project_parent_forecasted_end_date
COPY project_parent_type_required mnt/extra-addons/project_parent_type_required
COPY project_portal_hide_timesheets mnt/extra-addons/project_portal_hide_timesheets
COPY project_portal_parent_task mnt/extra-addons/project_portal_parent_task
COPY project_portal_parent_task mnt/extra-addons/project_portal_parent_task
COPY project_progress_variance /mnt/extra-addons/project_progress_variance
COPY project_projected_hours mnt/extra-addons/project_projected_hours
COPY project_projected_hours mnt/extra-addons/project_projected_hours
COPY project_remaining_hours_update /mnt/extra-addons/project_remaining_hours_update
COPY project_stage_allow_timesheet mnt/extra-addons/project_stage_allow_timesheet
COPY project_stage_no_quick_create mnt/extra-addons/project_stage_no_quick_create
COPY project_task_analytic_lines /mnt/extra-addons/project_task_analytic_lines
COPY project_task_date_planned /mnt/extra-addons/project_task_date_planned
COPY project_task_deadline_from_project /mnt/extra-addons/project_task_deadline_from_project
COPY project_task_description_template /mnt/extra-addons/project_task_description_template
Expand All @@ -49,4 +50,4 @@ COPY project_track_end_date /mnt/extra-addons/project_track_end_date
COPY project_type_advanced /mnt/extra-addons/project_type_advanced

COPY .docker_files/main /mnt/extra-addons/main
COPY .docker_files/odoo.conf /etc/odoo
COPY .docker_files/odoo.conf /etc/odoo
115 changes: 115 additions & 0 deletions project_task_analytic_lines/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
Project Task Analytic Lines
===========================

.. contents:: Table of Contents

Odoo Context
------------
In vanilla Odoo, analytic lines can not be grouped or filtered by task, except for timesheet lines.

Therefore, if you need to generate a cost report, only the timesheet lines will be shown per task.

Summary
-------
This module adds a `Task` field on supplier invoice lines and journal entries.

The task is propagated from invoice lines to journal entries and analytic lines

Then, the analytic lines can be filtered and grouped by task.

Invoices
--------
As member of the group `Accounting / Billing`, on a draft invoice, I find a new field `Task`.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/invoice_form.png

The field is readonly if the analytic account is not filled.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/invoice_task_readonly.png

If an analytic account is selected, I am able to select a task related to project of the analytic account.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/invoice_task_selected.png

I validate the invoice.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/invoice_validated.png

On the journal Items tab, I notice that the task was propagated to the expense line.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/journal_items.png

In the list of analytic lines, I notice that the task was propagated.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/analytic_lines_task.png


List Views Filters
------------------

Analytic Lines
~~~~~~~~~~~~~~
In the list of analytic lines, I see a new field `Task`.

..
A new technical field (origin_task_id) was added because the field task_id
available in vanilla Odoo could not be used.

The field task_id is used by Odoo for timesheet lines.
If task_id was used for any other purpose, some standard functionalities would be broken.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/analytic_lines_origin_task_column.png

I am able to search by task:

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/analytic_lines_search.png

I am able to group by task:

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/analytic_lines_group.png

Journal Items
~~~~~~~~~~~~~
In the list view of journal items, I see a new field `Task`.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/journal_items_task_column.png

I am able to search by task:

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/journal_items_search.png

I am able to group by task:

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/journal_items_group.png

Constraints
-----------
Once a task is selected on an invoice, it is not possible to move the task to another project.

Otherwise, when changing the project on the task, a blocking message is displayed.

.. image:: https://raw.githubusercontent.com/Numigi/odoo-project-addons/16.0/project_task_analytic_lines/static/description/task_change_project_constraint.png

Limits
------

Purchase Orders
~~~~~~~~~~~~~~~
This module does not define how tasks are propagated from a purchase order to a supplier invoice.

The module `project_wip_outsourcing` inherits this module and adds the business logic related to outsourcing.
For now, outsourcing is the only known case where defining a task on a PO is relevant.

Stockable Products
~~~~~~~~~~~~~~~~~~
An analytic account and a task should not be set on a supplier invoice for stockable products.
The expense for a stockable product is recognized in Odoo at the customer invoice validation.

The module is intended for services (or even consummable products).

However, the module does not constrain on which type of product a task can be used.

Contributors
------------
* Numigi (tm) and all its contributors (https://bit.ly/numigiens)
4 changes: 4 additions & 0 deletions project_task_analytic_lines/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import models

Check notice on line 4 in project_task_analytic_lines/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/__init__.py#L4

'.models' imported but unused (F401)
22 changes: 22 additions & 0 deletions project_task_analytic_lines/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{

Check warning on line 4 in project_task_analytic_lines/__manifest__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/__manifest__.py#L4

Statement seems to have no effect
"name": "Project Task Analytic Lines",
"version": "16.0.1.0.0",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://bit.ly/numigi-com",
"license": "LGPL-3",
"category": "Project",
"summary": "Add a task on journal entries and vendor bills",
"depends": [
"account",
"hr_timesheet",
],
"data": [
"views/account_analytic_line_views.xml",
"views/account_move_line_views.xml",
],
"installable": True,
}
146 changes: 146 additions & 0 deletions project_task_analytic_lines/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_analytic_lines
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-12-10 21:51+0000\n"
"PO-Revision-Date: 2020-12-10 16:51-0500\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 2.0.6\n"

#. module: project_task_analytic_lines
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.account_move_line_search_with_task
msgid "Analytic Account"
msgstr "Compte analytique"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_analytic_line
msgid "Analytic Line"
msgstr "Ligne analytique"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_invoice
msgid "Invoice"
msgstr "Facture"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_invoice_line
msgid "Invoice Line"
msgstr "Ligne de facture"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_invoice_tax
msgid "Invoice Tax"
msgstr "Taxe de facture"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_move
msgid "Journal Entries"
msgstr "Pièces comptables"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_account_move_line
msgid "Journal Item"
msgstr "Écriture comptable"

#. module: project_task_analytic_lines
#: model:ir.model.fields,field_description:project_task_analytic_lines.field_account_analytic_line__origin_task_id
msgid "Origin Task"
msgstr "Taxe d'origine"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_product_product
msgid "Product"
msgstr "Article"

#. module: project_task_analytic_lines
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.account_move_line_form_with_task
msgid "Project"
msgstr "Projet"

#. module: project_task_analytic_lines
#: model:ir.model,name:project_task_analytic_lines.model_project_task
#: model:ir.model.fields,field_description:project_task_analytic_lines.field_account_invoice_line__task_id
#: model:ir.model.fields,field_description:project_task_analytic_lines.field_account_invoice_tax__task_id
#: model:ir.model.fields,field_description:project_task_analytic_lines.field_account_move_line__task_id
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.account_move_line_form_with_analytic_lines_sanitized
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.account_move_line_search_with_task
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.analytic_line_form_with_origin_task
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.analytic_line_list_with_origin_task
#: model_terms:ir.ui.view,arch_db:project_task_analytic_lines.analytic_line_search_with_origin_task
msgid "Task"
msgstr "Tâche"

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/account_analytic_line.py:32
#, python-format
msgid ""
"The origin task {task} is set on the analytic line {line}. This task does "
"not match the analytic account ({analytic_account}) set on the line."
msgstr ""
"La tâche d'origine {task} est inscrite sur la ligne analytique {line}. Cette "
"tâche ne correspond pas au compte analytique ({account_account}) inscrit sur "
"la ligne."

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/project_task.py:66
#, python-format
msgid ""
"The task {task} can not be moved to another project because it is already "
"bound to a posted journal entry ({move})."
msgstr ""
"La tâche {task} ne peut pas être déplacée vers un autre projet, car elle est "
"déjà liée à une écriture comptable comptabilisée ({move})."

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/project_task.py:49
#, python-format
msgid ""
"The task {task} can not be moved to another project because it is already "
"bound to a validated invoice ({invoice})."
msgstr ""
"La tâche {task} ne peut pas être déplacée vers un autre projet, car elle est "
"déjà liée à une facture validée ({invoice})."

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/account_invoice_line.py:27
#, python-format
msgid ""
"The task {task} is set on the invoice line {line}. This task does not match "
"the project ({project}) set on the line."
msgstr ""
"La tâche d'origine {task} est inscrite sur la ligne de facture {line}. Cette "
"tâche ne correspond pas au projet ({project}) inscrit sur la ligne."

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/account_move_line.py:33
#, python-format
msgid ""
"The task {task} is set on the journal item {line}. This task does not match "
"the project ({project}) set on the line."
msgstr ""
"La tâche d'origine {task} est inscrite sur la ligne d'écriture comptable "
"{line}. Cette tâche ne correspond pas au projet ({project}) inscrit sur la "
"ligne."

#. module: project_task_analytic_lines
#: code:addons/project_task_analytic_lines/models/account_invoice_tax.py:26
#, python-format
msgid ""
"The task {task} is set on the tax line {line}. This task does not match the "
"project ({project}) set on the line."
msgstr ""
"La tâche d'origine {task} est inscrite sur la ligne de taxe {line}. Cette "
"tâche ne correspond pas au projet ({project}) inscrit sur la ligne."

#~ msgid "Account Entry"
#~ msgstr "Pièce comptable"
7 changes: 7 additions & 0 deletions project_task_analytic_lines/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import account_analytic_line

Check notice on line 4 in project_task_analytic_lines/models/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/models/__init__.py#L4

'.account_analytic_line' imported but unused (F401)
from . import account_move

Check notice on line 5 in project_task_analytic_lines/models/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/models/__init__.py#L5

'.account_move' imported but unused (F401)
from . import account_move_line

Check notice on line 6 in project_task_analytic_lines/models/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/models/__init__.py#L6

'.account_move_line' imported but unused (F401)
from . import project_task

Check notice on line 7 in project_task_analytic_lines/models/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

project_task_analytic_lines/models/__init__.py#L7

'.project_task' imported but unused (F401)
Loading
Loading