← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 716882] Re: negative remaining_hours in project_task

 

Hello Amit,

If the task is linked with a project, the indicators of the project are wrong.
On the project view, the time spent and total time of the project are =0...

Thanks

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716882

Title:
  negative remaining_hours in project_task

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  As soon as the effectivly done work on a task in hours exceeds the
  planned hours I'd expect the delay_hours to reflect that situation.
  However instead the remaining_hours will further decreased turning
  into a negative number.

  steps to reproduce:
  1. create a task with 0-X planned hours (0 to see the effect straight away)
  2. do some work on the task (less then X)
  3. see remaining hours decrease
  4. Up to now: everything fine
  5. do some work so the effective hours exceed the plannend hours(X)
  6. Remaining hours turn negative

  how to fix:
  * IMO reamining_hours must never be less than 0
  * when saving the work and recalculation is done remaining hours should only be lowered to minimum 0

  project/project.py
  class project_work(osv.osv)
  def write 
   cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id))

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/716882/+subscriptions


References