Commit 00d91280 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: fetch currency from project default trade condition

parent 537c49d3
......@@ -2,10 +2,9 @@ from Products.ERP5Type.Message import translateString
portal = context.getPortalObject()
project = context
preference_tool = portal.portal_preferences
trade_condition = project.getSpecialiseValue(portal_type="Sale Trade Condition")
# XXX HARDCODED. Probably not the correct configuration. It may be instead linked to the project / web site?
currency = preference_tool.getPreferredAccountingTransactionCurrency()
currency = trade_condition.getPriceCurrency()
sale_supply = portal.sale_supply_module.newContent(
title="All %s" % DateTime(),
......
......@@ -3,15 +3,15 @@ from DateTime import DateTime
project = context
portal = context.getPortalObject()
trash_tool = portal.portal_trash
preference_tool = portal.portal_preferences
destination_value = portal.portal_membership.getAuthenticatedMember().getUserValue()
allocation_predicate_list = project.Project_getSoftwareProductPredicateList(destination_value=destination_value)
now = DateTime()
# XXX HARDCODED. Probably not the correct configuration. It may be instead linked to the project / web site?
currency = preference_tool.getPreferredAccountingTransactionCurrency()
trade_condition = project.getSpecialiseValue(portal_type="Sale Trade Condition")
currency = trade_condition.getPriceCurrency()
result_list = []
......
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