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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
7032d8b3
Commit
7032d8b3
authored
Feb 22, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: use Project_getAccountingCurrency
parent
dd9d142b
Changes
2
Show 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 @
7032d8b3
...
@@ -2,9 +2,16 @@ from Products.ERP5Type.Message import translateString
...
@@ -2,9 +2,16 @@ from Products.ERP5Type.Message import translateString
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
project
=
context
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
(
sale_supply
=
portal
.
sale_supply_module
.
newContent
(
title
=
"All %s"
%
DateTime
(),
title
=
"All %s"
%
DateTime
(),
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getPayableSoftwareProductPredicateList.py
View file @
7032d8b3
...
@@ -10,11 +10,12 @@ allocation_predicate_list = project.Project_getSoftwareProductPredicateList(dest
...
@@ -10,11 +10,12 @@ allocation_predicate_list = project.Project_getSoftwareProductPredicateList(dest
now
=
DateTime
()
now
=
DateTime
()
trade_condition
=
project
.
getSpecialiseValue
(
portal_type
=
"Sale Trade Condition"
)
currency
=
trade_condition
.
getPriceCurrency
()
result_list
=
[]
result_list
=
[]
currency
=
project
.
Project_getAccountingCurrency
()
if
currency
is
None
:
return
result_list
for
allocation_predicate
in
allocation_predicate_list
:
for
allocation_predicate
in
allocation_predicate_list
:
software_product
=
allocation_predicate
.
getResourceValue
()
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