c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #15784
[Bug 716882] [NEW] negative remaining_hours in project_task
Public bug reported:
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))
** Affects: openobject-addons
Importance: Undecided
Status: New
--
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):
New
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))
Follow ups
References