Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
8f782d88
Commit
8f782d88
authored
Feb 22, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: use Project_getAccountingCurrency
parent
14560971
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSSaleSupply.py
.../portal_skins/slapos_panel/Project_addSlapOSSaleSupply.py
+9
-2
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getPayableSoftwareProductPredicateList.py
...s_panel/Project_getPayableSoftwareProductPredicateList.py
+4
-3
No files found.
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_addSlapOSSaleSupply.py
View file @
8f782d88
...
...
@@ -2,9 +2,16 @@ from Products.ERP5Type.Message import translateString
portal
=
context
.
getPortalObject
()
project
=
context
trade_condition
=
project
.
getSpecialiseValue
(
portal_type
=
"Sale Trade Condition"
)
currency
=
trade_condition
.
getPriceCurrency
()
currency
=
project
.
Project_getAccountingCurrency
()
if
currency
is
None
:
return
context
.
Base_redirect
(
keep_items
=
{
'portal_status_message'
:
translateString
(
'Can not find project currency'
),
'portal_status_level'
:
"error"
,
}
)
sale_supply
=
portal
.
sale_supply_module
.
newContent
(
title
=
"All %s"
%
DateTime
(),
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getPayableSoftwareProductPredicateList.py
View file @
8f782d88
...
...
@@ -10,11 +10,12 @@ allocation_predicate_list = project.Project_getSoftwareProductPredicateList(dest
now
=
DateTime
()
trade_condition
=
project
.
getSpecialiseValue
(
portal_type
=
"Sale Trade Condition"
)
currency
=
trade_condition
.
getPriceCurrency
()
result_list
=
[]
currency
=
project
.
Project_getAccountingCurrency
()
if
currency
is
None
:
return
result_list
for
allocation_predicate
in
allocation_predicate_list
:
software_product
=
allocation_predicate
.
getResourceValue
()
...
...
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