Commit bac1cf55 authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid using unsupported explanations.

Subscription Item typoes (like Hosting Subscription) are not supported as
explanation passed to builder.

Instead just generate Applied Rule path globbing passed to builder.
parent 5b83ed49
......@@ -50,16 +50,18 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>explanation = context.getExplanationValue()\n
\n
if context.getDelivery() is not None:\n
<value> <string>if context.getDelivery() is not None:\n
# movement build but not indexed, so do nothing\n
return\n
\n
root_applied_rule = context.getRootAppliedRule()\n
portal = context.getPortalObject()\n
for business_process in [\n
portal.business_process_module.vifib_sale_business_process,\n
portal.business_process_module.vifib_purchase_business_process]:\n
business_process.build(explanation)\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Business Link\',\n
parent_uid=[portal.business_process_module.vifib_sale_business_process.getUid(), portal.business_process_module.vifib_purchase_business_process.getUid()],\n
method_id=\'build\',\n
method_kw={\'path\': \'%s/%%\' % root_applied_rule.getPath()}\n
)\n
</string> </value>
</item>
<item>
......
573
\ No newline at end of file
574
\ No newline at end of file
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