Commit 8f782d88 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: use Project_getAccountingCurrency

parent 14560971
......@@ -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(),
......
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment