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
2
Merge Requests
2
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
3aabc268
Commit
3aabc268
authored
May 14, 2024
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: add get default asset price method
parent
9e370a19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Movement.py
...tTemplateItem/portal_components/document.erp5.Movement.py
+5
-0
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Movement.py
View file @
3aabc268
...
...
@@ -513,6 +513,11 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
return
type_based_script
()
return
self
.
_getAssetPrice
(
section
=
self
.
getDestinationSectionValue
(),
date
=
self
.
getStopDate
())
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getDefaultDestinationAssetPrice'
)
def
getDefaultDestinationAssetPrice
(
self
):
return
self
.
_getAssetPrice
(
section
=
self
.
getDestinationSectionValue
(),
date
=
self
.
getStopDate
())
def
_getAssetPrice
(
self
,
section
,
date
):
price
=
self
.
getPrice
()
if
section
is
None
or
not
price
or
getattr
(
...
...
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