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
e1b03ac4
Commit
e1b03ac4
authored
Dec 06, 2018
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Feb 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Movement: Add getSource(Destination)AssetPriceCurrency
parent
331700ac
Changes
2
Hide 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 @
e1b03ac4
...
...
@@ -529,6 +529,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/bootstrap/erp5_core/InterfaceTemplateItem/portal_components/interface.erp5.IAssetMovement.py
View file @
e1b03ac4
...
...
@@ -65,6 +65,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