Commit ed2aec41 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: do not filter by destination_project__uid=None

It leads to always return nothing, as it does a join to the category table
parent 6dc3a754
...@@ -75,17 +75,22 @@ while count > 0 and len(trade_condition_list) == 0: ...@@ -75,17 +75,22 @@ while count > 0 and len(trade_condition_list) == 0:
count -= 1 count -= 1
count = 0 count = 0
#raise NotImplementedError(order.getDestinationProjectUid()) #raise NotImplementedError(order.getDestinationProjectUid())
trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context, portal_type=trade_condition_portal_type,
validation_state='validated', filter_kw = {
specialise__uid='%', 'portal_type': trade_condition_portal_type,
'validation_state': 'validated',
'specialise__uid': '%',
#source_project__uid=order.getSourceProjectUid(), #source_project__uid=order.getSourceProjectUid(),
destination_project__uid=order.getDestinationProjectUid(), }
if order.hasDestinationProject():
filter_kw['destination_project__uid'] = order.getDestinationProjectUid()
trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context,
tested_base_category_list=tested_base_category_list,#[:count], tested_base_category_list=tested_base_category_list,#[:count],
filter_method=filter_method, filter_method=filter_method,
sort_method=sort_method) sort_method=sort_method, **filter_kw)
#raise NotImplementedError('trade cl %s' % str([(x, rank_method(x), x.getValidationState()) for x in trade_condition_list])) #raise NotImplementedError('trade cl %s' % str([(x, rank_method(x), x.getValidationState()) for x in trade_condition_list]))
......
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_bind_names</string> </key>
<value> <value>
<object> <object>
<klass> <klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> <global name="_reconstructor" module="copy_reg"/>
</klass> </klass>
<tuple/> <tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state> <state>
<dictionary> <dictionary>
<item> <item>
......
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