Commit 8fb9c8e9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

similar to r34086, for call pack() only if transition is possible.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34088 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 208f3e0b
...@@ -54,10 +54,13 @@ ...@@ -54,10 +54,13 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change[\'object\']\n <value> <string>packing_list = state_change[\'object\']\n
isTransitionPossible = packing_list.getPortalObject().portal_workflow.isTransitionPossible\n
if packing_list.isPacked():\n if packing_list.isPacked():\n
packing_list.pack()\n if isTransitionPossible(packing_list, \'pack\'):\n
elif packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'miss\'):\n packing_list.pack()\n
packing_list.miss()\n else:\n
if isTransitionPossible(packing_list, \'miss\'):\n
packing_list.miss()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -99,6 +102,7 @@ elif packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing ...@@ -99,6 +102,7 @@ elif packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing
<string>_getitem_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>isTransitionPossible</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
885 886
\ 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