Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lefilament_projets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
lefilament_projets
Commits
dd24e1c8
Commit
dd24e1c8
authored
7 years ago
by
Benjamin
Browse files
Options
Downloads
Patches
Plain Diff
[fix] erreur calcul heures
parent
8e1adcd4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lefilament_projets.py
+9
-3
9 additions, 3 deletions
lefilament_projets.py
with
9 additions
and
3 deletions
lefilament_projets.py
+
9
−
3
View file @
dd24e1c8
...
@@ -26,9 +26,15 @@ class SapovalPartners(models.Model):
...
@@ -26,9 +26,15 @@ class SapovalPartners(models.Model):
@api.one
@api.one
def
_total_heures_passees
(
self
):
def
_total_heures_passees
(
self
):
res
=
0.0
res
=
0.0
for
record
in
self
.
task_ids
:
account
=
self
.
analytic_account_id
.
id
res
=
res
+
record
.
effective_hours
############## Calcul couts annexes ################
self
.
lf_heures_passees
=
res
self
.
env
.
cr
.
execute
(
"
select sum(unit_amount) from account_analytic_line where is_timesheet=TRUE and account_id=%s;
"
,
(
account
,
)
)
heures_passees
=
self
.
env
.
cr
.
fetchone
()[
0
]
if
heures_passees
:
self
.
lf_heures_passees
=
heures_passees
else
:
self
.
lf_heures_passees
=
0.0
@api.one
@api.one
def
_total_heures_planifiees
(
self
):
def
_total_heures_planifiees
(
self
):
...
...
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