Commit a6bcfac2 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Only filter to generate SPL only from certain services

   The list is filtered by the services that have base_amount with an invoicing (or subcategory of invoicing).
parent 22ae284a
Pipeline #15759 failed with stage
in 0 seconds
......@@ -17,6 +17,10 @@ consumption_specialise_uid_list = [q.getUid() for q in portal.portal_catalog(
specialise_uid=portal.business_process_module.slapos_consumption_business_process.getUid(),
portal_type='Sale Trade Condition')]
aggregateable_service_uid_list = [service.getUid() for service in \
portal.portal_categories.base_amount.invoicing.getBaseContributionRelatedValueList(portal_type="Service")]
select_dict= {'default_aggregate_portal_type': None}
select_kw.update(
......@@ -26,6 +30,7 @@ select_kw.update(
parent_specialise_uid=specialise_uid_list+consumption_specialise_uid_list,
select_dict=select_dict,
left_join_list=select_dict.keys(),
resource__uid=aggregateable_service_uid_list,
default_aggregate_portal_type=ComplexQuery(NegatedQuery(Query(default_aggregate_portal_type='Computer')),
Query(default_aggregate_portal_type=None),logical_operator="OR"),
grouping_reference=None,
......
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