Commit acc65d77 authored by Alain Takoudjou's avatar Alain Takoudjou

OrderBuilder: Optimize performances a bit by selecting with uid

parent e3a4c63b
......@@ -59,15 +59,14 @@ portal = context.getPortalObject()\n
business_process_uid_list = [\n
portal.business_process_module.slapos_consumption_business_process.getUid(),\n
portal.business_process_module.slapos_subscription_business_process.getUid()]\n
specialise_reference_list = [q.getReference() for q in portal.portal_catalog(specialise_uid=business_process_uid_list,\n
specialise_uid_list = [q.getUid() for q in portal.portal_catalog(specialise_uid=business_process_uid_list,\n
portal_type=\'Sale Trade Condition\')]\n
\n
select_kw.update(\n
limit=50, # just take a bit\n
portal_type=\'Sale Packing List Line\',\n
simulation_state=\'delivered\',\n
parent_specialise_reference=specialise_reference_list,\n
parent_specialise_portal_type=\'Sale Trade Condition\',\n
parent_specialise_uid=specialise_uid_list,\n
grouping_reference=None,\n
sort_on=((\'modification_date\', \'ASC\'),) # the highest chance to find movement which can be delivered\n
)\n
......
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