Commit 32df7a5c authored by Łukasz Nowak's avatar Łukasz Nowak

Create new deliveries only if order is confirmed.

parent 2dfe4ce4
...@@ -129,7 +129,7 @@ if (partition is None):\n ...@@ -129,7 +129,7 @@ if (partition is None):\n
else:\n else:\n
assert delivery is not None\n assert delivery is not None\n
\n \n
if (delivery.getPortalType() == "Sale Order"):\n if (delivery.getPortalType() == "Sale Order" and delivery.getSimulationState() == "confirmed"):\n
if (state == stopped):\n if (state == stopped):\n
# Try to find the setup packing list created from the open order to\n # Try to find the setup packing list created from the open order to\n
# associate it instead of the sale order\n # associate it instead of the sale order\n
...@@ -176,8 +176,7 @@ else:\n ...@@ -176,8 +176,7 @@ else:\n
elif (state == destroyed):\n elif (state == destroyed):\n
packing_list.confirm()\n packing_list.confirm()\n
\n \n
else:\n elif delivery.getPortalType() == "Sale Packing List":\n
assert delivery.getPortalType() == "Sale Packing List"\n
line_list = delivery.contentValues(portal_type="Sale Packing List Line")\n line_list = delivery.contentValues(portal_type="Sale Packing List Line")\n
assert len(line_list) == 1\n assert len(line_list) == 1\n
line = line_list[0]\n line = line_list[0]\n
......
12 13
\ No newline at end of file \ 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