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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
f2853f89
Commit
f2853f89
authored
Dec 06, 2018
by
Cédric Le Ninivin
Committed by
Your Name
Mar 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Movement: Add getSource(Destination)AssetPriceCurrency
parent
f6aad817
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
product/ERP5/Document/Movement.py
product/ERP5/Document/Movement.py
+22
-0
product/ERP5/interfaces/movement.py
product/ERP5/interfaces/movement.py
+14
-0
No files found.
product/ERP5/Document/Movement.py
View file @
f2853f89
...
...
@@ -528,6 +528,28 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
return
exchange_rate
*
price
return
price
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getSourceAssetPriceCurrency'
)
def
getSourceAssetPriceCurrency
(
self
):
"""
Returns the price currency of the source section
"""
type_based_script
=
self
.
_getTypeBasedMethod
(
'getSourceAssetPriceCurrency'
)
if
type_based_script
:
return
type_based_script
()
return
self
.
getPriceCurrency
()
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getDestinationAssetPriceCurrency'
)
def
getDestinationAssetPriceCurrency
(
self
):
"""
Returns the price currency of the destination section
"""
type_based_script
=
self
.
_getTypeBasedMethod
(
'getDestinationAssetPriceCurrency'
)
if
type_based_script
:
return
type_based_script
()
return
self
.
getPriceCurrency
()
# Causality computation
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isConvergent'
)
...
...
product/ERP5/interfaces/movement.py
View file @
f2853f89
...
...
@@ -68,6 +68,20 @@ class IAssetMovement(IAmount):
the same company.
"""
def
getSourceAssetPriceCurrency
():
"""
Return the asset price currency of the source section,
usually the currency of the movement. It is also possible for
a movement to have 'None' source asset price currency.
"""
def
getDestinationAssetPriceCurrency
():
"""
Return the asset price currency of the destination section,
usually the currency of the movement. It is also possible for
a movement to have 'None' destination asset price currency.
"""
def
getSourceInventoriatedTotalAssetPrice
():
"""
Returns the total asset price for the source section, either
...
...
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