Commit 56173791 authored by Rafael Monnerat's avatar Rafael Monnerat

Make Interaction workflow less intrusive

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21330 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9da5fa8
......@@ -65,12 +65,18 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>order = state_change[\'object\']\n
<value> <string encoding="cdata"><![CDATA[
order = state_change[\'object\']\n
\n
item_list = order.getAggregateValueList()\n
quantity = sum([ i.getQuantity() for i in item_list if i.getQuantity() is not None ])\n
order.setQuantity(quantity)\n
</string> </value>
\n
if quantity > order.getQuantity():\n
order.setQuantity(quantity)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......
......@@ -68,13 +68,14 @@
<value> <string>order = state_change[\'object\']\n
\n
resource_list = [ ]\n
for item in order.getAggregateValueList():\n
resource = item.Item_getResourceValue()\n
if resource not in resource_list or (resource is not None):\n
resource_list.append(resource)\n
if order.getResourceValue() in [\'\', None ]:\n
for item in order.getAggregateValueList():\n
resource = item.Item_getResourceValue()\n
if resource not in resource_list or (resource is not None):\n
resource_list.append(resource)\n
\n
if len(resource_list) == 1: \n
order.setResourceValue(resource)\n
if len(resource_list) == 1: \n
order.setResourceValue(resource)\n
</string> </value>
</item>
<item>
......@@ -121,11 +122,11 @@ if len(resource_list) == 1: \n
<string>_getitem_</string>
<string>order</string>
<string>resource_list</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>None</string>
<string>_getiter_</string>
<string>item</string>
<string>resource</string>
<string>None</string>
<string>len</string>
</tuple>
</value>
......
44
\ No newline at end of file
45
\ 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