Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
00ad7bcf
Commit
00ad7bcf
authored
14 years ago
by
Rohan Nayani
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] Peoject->task - Dealy Value
bzr revid: ron@tinyerp.com-20101015133729-id40xkl3qb8lu20e
parent
e1dcf5aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/project/project.py
+5
-2
5 additions, 2 deletions
addons/project/project.py
with
5 additions
and
2 deletions
addons/project/project.py
+
5
−
2
View file @
00ad7bcf
...
...
@@ -395,10 +395,13 @@ class task(osv.osv):
if
hours
.
get
(
task
.
id
,
False
):
dur_in_user_uom
=
uom_obj
.
_compute_qty
(
cr
,
uid
,
default_uom
,
hours
.
get
(
task
.
id
,
0.0
),
user_uom
)
hours
[
task
.
id
]
=
dur_in_user_uom
timespent
=
0
for
task
in
self
.
browse
(
cr
,
uid
,
ids
,
context
=
context
):
res
[
task
.
id
]
=
{
'
effective_hours
'
:
hours
.
get
(
task
.
id
,
0.0
),
'
total_hours
'
:
task
.
remaining_hours
+
hours
.
get
(
task
.
id
,
0.0
)}
res
[
task
.
id
][
'
delay_hours
'
]
=
res
[
task
.
id
][
'
total_hours
'
]
-
task
.
planned_hours
# res[task.id]['delay_hours'] = res[task.id]['total_hours'] - task.planned_hours
for
ctimespent
in
task
.
work_ids
:
timespent
=
timespent
+
ctimespent
.
hours
res
[
task
.
id
][
'
delay_hours
'
]
=
task
.
planned_hours
-
timespent
res
[
task
.
id
][
'
progress
'
]
=
0.0
if
(
task
.
remaining_hours
+
hours
.
get
(
task
.
id
,
0.0
)):
res
[
task
.
id
][
'
progress
'
]
=
round
(
min
(
100.0
*
hours
.
get
(
task
.
id
,
0.0
)
/
res
[
task
.
id
][
'
total_hours
'
],
99.99
),
2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment