Commit 84ddf3d5 authored by Łukasz Nowak's avatar Łukasz Nowak

Set always price to 0

On non cancelled PPL set quantity 1.0
parent dfb2d23c
......@@ -51,11 +51,12 @@
<item>
<key> <string>_body</string> </key>
<value> <string>assert( context.getPortalType() in context.getPortalDeliveryMovementTypeList() )\n
if context.getSimulationState() == \'cancelled\':\n
return\n
price = context.getPrice()\n
context.setPrice(0.0)\n
context.setQuantity(1.0)\n
if context.getSimulationState() == \'cancelled\':\n
# force no simulation\n
context.setQuantity(0.0)\n
else:\n
context.setQuantity(1.0)\n
context.getParentValue().Delivery_updateAppliedRule()\n
</string> </value>
</item>
......
......@@ -52,7 +52,6 @@
<key> <string>_body</string> </key>
<value> <string>if context.getPortalType() != \'Sale Order Line\':\n
raise ValueError(\'%s is not sale order line\' % context.getPath())\n
price = context.getPrice()\n
context.setPrice(0.0)\n
context.setQuantity(1.0)\n
context.getParentValue().Delivery_updateAppliedRule()\n
......
34
\ No newline at end of file
35
\ 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