Commit f1b7477e authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: ensure the same currency is used on Order and Trade Condition

parent c0bef6e1
...@@ -10,7 +10,7 @@ trade_condition_list = order.getSpecialiseValueList( ...@@ -10,7 +10,7 @@ trade_condition_list = order.getSpecialiseValueList(
all_category_list = ('source_section', 'source', 'source_project', all_category_list = ('source_section', 'source', 'source_project',
'destination_section', 'destination', 'destination_project', 'destination_section', 'destination', 'destination_project',
'currency') 'price_currency')
matching_category_list = ('source_project', 'destination_project') matching_category_list = ('source_project', 'destination_project')
tested_base_category_list = [ ] tested_base_category_list = [ ]
...@@ -93,6 +93,8 @@ while count > 0 and len(trade_condition_list) == 0: ...@@ -93,6 +93,8 @@ while count > 0 and len(trade_condition_list) == 0:
filter_kw['destination_project__uid'] = order.getDestinationProjectUid() filter_kw['destination_project__uid'] = order.getDestinationProjectUid()
if order.hasSourceProject(): if order.hasSourceProject():
filter_kw['source_project__uid'] = order.getSourceProjectUid() filter_kw['source_project__uid'] = order.getSourceProjectUid()
if order.hasPriceCurrency():
filter_kw['price_currency__uid'] = order.getPriceCurrencyUid()
trade_condition_list = context.portal_domains.searchPredicateList( trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context, predicate_context,
......
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