[IMP] project_task_billable_hours : display billable_remaining_hours instead of remaining_hours in project kanban view #26

Open
mondot wants to merge 1 commits from project_task_billable_hours-display-billable_remaining_hours-in-project-kanban-view into 16.0
mondot commented 2025-09-04 15:25:27 +00:00 (Migrated from github.com)
New PR following comments on this one https://github.com/elabore-coop/project-tools/pull/25 Task : https://lokavaluto.fr/web?debug=1#id=2526&cids=1&menu_id=144&action=977&model=project.task&view_type=form
LaetitiaElabore commented 2025-09-11 09:30:09 +00:00 (Migrated from github.com)

Hello!

il manque dans le fichier init_.py from . import models

dans le manifest, il faudrait incrémenter le numéro de version

le champ billable_remaining_hours ne sert qu'à de l'affichage, dans ce cas, le store = True et le @api.depends n'est pas utile

pour le calcul du temps restants, je partirais plutôt du temps alloué du projet auquel je soustrais le temps facturable des taches

Hello! il manque dans le fichier _init__.py from . import models dans le manifest, il faudrait incrémenter le numéro de version le champ billable_remaining_hours ne sert qu'à de l'affichage, dans ce cas, le store = True et le @api.depends n'est pas utile pour le calcul du temps restants, je partirais plutôt du temps alloué du projet auquel je soustrais le temps facturable des taches
LaetitiaElabore (Migrated from github.com) reviewed 2025-09-11 09:30:38 +00:00
@@ -0,0 +11,4 @@
)
@api.depends("task_ids.billable_remaining_hours")
def _compute_project_billable_remaining_hours(self):
LaetitiaElabore (Migrated from github.com) commented 2025-09-11 09:30:38 +00:00

proposition

def _compute_project_billable_remaining_hours(self):
for project in self:
project.billable_remaining_hours = project.allocated_hours - sum(task.billable_effective_hours for task in project.task_ids)

proposition def _compute_project_billable_remaining_hours(self): for project in self: project.billable_remaining_hours = project.allocated_hours - sum(task.billable_effective_hours for task in project.task_ids)
mondot self-assigned this 2025-09-25 13:02:52 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin project_task_billable_hours-display-billable_remaining_hours-in-project-kanban-view:project_task_billable_hours-display-billable_remaining_hours-in-project-kanban-view
git checkout project_task_billable_hours-display-billable_remaining_hours-in-project-kanban-view
Sign in to join this conversation.
No description provided.