Encountered a bug while choosing individual solvers for each Purchase Packing List Line. Looked for it in erp-report archives and did not find any fix for it. The dictionary access was erroneous. Herein is the correction.<br>
Don&#39;t know how to get the .xml diff hence submitting it this way.<br><br><table border="1"><tbody><tr><td><pre> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br></pre>
</td>
<td><pre>## Script (Python) &quot;PackingList_doSolveActions&quot;<br>##bind container=container<br>##bind context=context<br>##bind namespace=<br>##bind script=script<br>##bind subpath=traverse_subpath<br>##parameters=form_id, dialog_id=&#39;&#39;, **kw
<br>##title=<br>##<br>request = context.REQUEST<br><br>listbox = request.get(&#39;listbox&#39;)<br>start_date = context.getStartDate()<br>stop_date = context.getStopDate()<br>tag = context.getPath() + &#39;_split&#39;<br>
<br>split_and_defer = 0<br><br>if listbox is not None:<br>    context.updateAppliedRule(&quot;default_delivery_rule&quot;)<br></pre></td>
</tr>

<tr>
<td><pre>-<br>+<br>+<br></pre></td>
<td><pre>    for line in listbox:<br>    for line_key in listbox:<br>        line = listbox[line_key]<br></pre></td>
</tr>

<tr>
<td><pre> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br></pre></td>
<td><pre>        url = line[&#39;listbox_key&#39;]<br>        quantity = line[&#39;quantity&#39;]<br>        movement = context.restrictedTraverse(url)<br>        movement.setProperty(&#39;quantity&#39;, quantity, type=&#39;float&#39;)
<br>        choice = line[&#39;choice&#39;]        <br>        if choice == &#39;SplitAndDefer&#39;:<br>            split_and_defer = 1<br>            context.portal_simulation.solveMovement(movement, None, &quot;SplitAndDefer&quot;, start_date=start_date, stop_date=stop_date, activate_kw={&#39;tag&#39;:tag})
<br>        elif choice == &#39;CopyToTarget&#39;:<br>            context.portal_simulation.solveMovement(movement, None,&quot;CopyToTarget&quot;)<br><br>    context.updateCausalityState()<br><br>    if split_and_defer:<br>
        # Create delivery<br>        order = context.getCausalityValue()<br>        applied_rule = order.getCausalityRelatedValue(portal_type=&quot;Applied Rule&quot;)<br><br>        order_portal_type = order.getPortalType
()<br>        if order_portal_type == &#39;Sale Order&#39;:<br>            delivery_builder = order.portal_deliveries.sale_packing_list_builder<br>        elif order_portal_type == &#39;Purchase Order&#39;:<br>            delivery_builder = 
order.portal_deliveries.purchase_packing_list_builder<br><br>        explanation_uid_list = [order.getUid(),context.getUid()]<br>        delivery_builder.activate(activity=&#39;SQLQueue&#39;,after_tag=tag).build(explanation_uid=explanation_uid_list)
<br>   <br><br>redirect_url = &#39;%s/%s?%s&#39; % (context.absolute_url(), form_id, <br>                               &#39;portal_status_message=Sale+Packing+List+updated.&#39;)<br>context.REQUEST[ &#39;RESPONSE&#39; ].redirect( redirect_url )
</pre></td></tr></tbody></table><br>Regards,<br>Shresth<br>