[FIX] project: Overpassed Deadline computation
authorMartin Trigaux <mat@odoo.com>
Fri, 17 Oct 2014 14:31:30 +0000 (16:31 +0200)
committerMartin Trigaux <mat@odoo.com>
Fri, 17 Oct 2014 15:21:30 +0000 (17:21 +0200)
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

addons/project/report/project_report.py

index e1e6805..7bd8b82 100644 (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