[FIX] project: Overpassed Deadline computation

The field delay_endings_days represents the number of days since the deadline.
This field was using the write_date instead of now to compute it and was using the absolute value (so project in advance would also get overdue days
This commit is contained in:
Martin Trigaux 2014-10-17 16:31:30 +02:00
parent ef4d8b2df0
commit 2893198165
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class report_project_task_user(osv.osv):
planned_hours as hours_planned,
(extract('epoch' from (t.write_date-t.create_date)))/(3600*24) as closing_days,
(extract('epoch' from (t.date_start-t.create_date)))/(3600*24) as opening_days,
abs((extract('epoch' from (t.date_deadline-t.write_date)))/(3600*24)) as delay_endings_days
(extract('epoch' from (t.date_deadline-now())))/(3600*24) as delay_endings_days
FROM project_task t
WHERE t.active = 'true'
GROUP BY