Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
9ef58d41
Commit
9ef58d41
authored
Aug 29, 2013
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing whitespaces and previous_date because is assigned but never used
parent
c1daabec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
product/ERP5/Document/PresencePeriod.py
product/ERP5/Document/PresencePeriod.py
+7
-8
No files found.
product/ERP5/Document/PresencePeriod.py
View file @
9ef58d41
...
...
@@ -38,7 +38,7 @@ from Products.ERP5Type.DateUtils import addToDate
class
PresencePeriod
(
Movement
,
PeriodicityMixin
):
"""
Presence Period is used to add available time of the user in a
Presence Period is used to add available time of the user in a
period of Time
"""
...
...
@@ -94,8 +94,8 @@ class PresencePeriod(Movement, PeriodicityMixin):
"""
quantity
=
self
.
getQuantity
(
*
args
,
**
kw
)
if
quantity
in
[
None
,
0
]:
calendar_start_date
=
self
.
getStartDate
()
calendar_stop_date
=
self
.
getStopDate
()
calendar_start_date
=
self
.
getStartDate
()
calendar_stop_date
=
self
.
getStopDate
()
if
(
calendar_start_date
is
not
None
)
and
(
calendar_stop_date
is
not
None
):
# Convert Days to second
quantity
=
int
(
calendar_stop_date
)
-
int
(
calendar_start_date
)
...
...
@@ -108,11 +108,11 @@ class PresencePeriod(Movement, PeriodicityMixin):
def
asMovementList
(
self
):
"""
Generate multiple movement from a single one.
It is used for cataloging a movement multiple time in
It is used for cataloging a movement multiple time in
the movement/stock tables.
Ex: a movement have multiple destinations.
asMovementList returns a list a movement context with different
asMovementList returns a list a movement context with different
single destination.
"""
result
=
[]
...
...
@@ -163,7 +163,7 @@ class PresencePeriod(Movement, PeriodicityMixin):
(
current_exception_date
<
next_start_date
.
Date
()):
# SQL method don't like iterator
# yield (next_start_date, next_start_date+duration)
result
.
append
([
next_start_date
,
result
.
append
([
next_start_date
,
addToDate
(
next_start_date
,
second
=
second_duration
)])
# Update the next exception date
if
len
(
exception_date_list
)
!=
0
:
...
...
@@ -173,7 +173,7 @@ class PresencePeriod(Movement, PeriodicityMixin):
else
:
# SQL method don't like iterator
# yield (next_start_date, next_start_date+duration)
result
.
append
([
next_start_date
,
result
.
append
([
next_start_date
,
addToDate
(
next_start_date
,
second
=
second_duration
)])
next_start_date
=
self
.
getNextPeriodicalDate
(
next_start_date
)
...
...
@@ -198,7 +198,6 @@ class PresencePeriod(Movement, PeriodicityMixin):
day_count
=
int
(
current_date
-
next_start_date
)
next_start_date
=
next_start_date
+
day_count
previous_date
=
next_start_date
next_start_date
=
addToDate
(
next_start_date
,
day
=
1
)
while
1
:
if
(
self
.
_validateDay
(
next_start_date
))
and
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment