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
Klaus Wölfel
erp5
Commits
8445ee04
Commit
8445ee04
authored
Dec 06, 2018
by
Cédric Le Ninivin
Committed by
Klaus Wölfel
Apr 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Movement: Add getSource(Destination)AssetPriceCurrency
parent
363624b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Movement.py
...tTemplateItem/portal_components/document.erp5.Movement.py
+22
-0
product/ERP5/bootstrap/erp5_core/InterfaceTemplateItem/portal_components/interface.erp5.IAssetMovement.py
...teItem/portal_components/interface.erp5.IAssetMovement.py
+14
-0
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Movement.py
View file @
8445ee04
...
@@ -531,6 +531,28 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
...
@@ -531,6 +531,28 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
return
exchange_rate
*
price
return
exchange_rate
*
price
return
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
# Causality computation
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'isConvergent'
)
'isConvergent'
)
...
...
product/ERP5/bootstrap/erp5_core/InterfaceTemplateItem/portal_components/interface.erp5.IAssetMovement.py
View file @
8445ee04
...
@@ -65,6 +65,20 @@ class IAssetMovement(IAmount):
...
@@ -65,6 +65,20 @@ class IAssetMovement(IAmount):
the same company.
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
():
def
getSourceInventoriatedTotalAssetPrice
():
"""
"""
Returns the total asset price for the source section, either
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