[IMP] project_task_billable_hours : display billable_remaining_hours instead of remaining_hours in project kanban view #26
Reference in New Issue
Block a user
No description provided.
Delete Branch "project_task_billable_hours-display-billable_remaining_hours-in-project-kanban-view"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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
@@ -0,0 +11,4 @@)@api.depends("task_ids.billable_remaining_hours")def _compute_project_billable_remaining_hours(self):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)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.