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
db65e749
Commit
db65e749
authored
Sep 23, 2015
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ImmobilisableItem: Do not propagate immo_period_list.
parent
b42a89f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
product/ERP5/Document/ImmobilisableItem.py
product/ERP5/Document/ImmobilisableItem.py
+2
-4
No files found.
product/ERP5/Document/ImmobilisableItem.py
View file @
db65e749
...
...
@@ -665,14 +665,13 @@ class ImmobilisableItem(Item, Amount):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRemainingAmortisationDuration'
)
def
getRemainingAmortisationDuration
(
self
,
at_date
=
None
,
**
kw
):
def
getRemainingAmortisationDuration
(
self
,
at_date
=
None
,
immo_period_list
=
None
,
**
kw
):
"""
Returns the calculated remaining amortisation duration for the item.
It is based on the latest immobilisation period at given date, or now.
"""
if
at_date
is
None
:
at_date
=
DateTime
()
immo_period_list
=
kw
.
get
(
'immo_period_list'
,
None
)
new_kw
=
dict
(
kw
)
if
new_kw
.
has_key
(
'to_date'
):
del
new_kw
[
'to_date'
]
...
...
@@ -695,7 +694,7 @@ class ImmobilisableItem(Item, Amount):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getRemainingDurability'
)
def
getRemainingDurability
(
self
,
at_date
=
None
,
**
kw
):
def
getRemainingDurability
(
self
,
at_date
=
None
,
immo_period_list
=
None
,
**
kw
):
"""
Returns the durability of the item at the given date, or now.
The durability is quantity of something which corresponds to the 'life' of the item
...
...
@@ -713,7 +712,6 @@ class ImmobilisableItem(Item, Amount):
if
at_date
is
None
:
at_date
=
DateTime
()
immo_period_list
=
kw
.
get
(
'immo_period_list'
,
None
)
new_kw
=
dict
(
kw
)
if
new_kw
.
has_key
(
'to_date'
):
del
new_kw
[
'to_date'
]
...
...
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