Commit c68e815f authored by Yusei Tahara's avatar Yusei Tahara

Fix material consumption tab. Sort result as user can easily understand.

parent 19a1ca78
......@@ -113,6 +113,14 @@ for movement in movement_list:\n
if quantity:\n
consumption_dict[obj.getUid()] = quantity * (movement.getQuantity() or 0)\n
\n
# sort result_list\n
transformation_allowed_content_type_list = context.portal_types[\'Transformation\'].getTypeAllowedContentTypeList()\n
def compare(a, b):\n
return cmp((consumption_dict.has_key(a.getUid()), a.portal_type in transformation_allowed_content_type_list),\n
(consumption_dict.has_key(b.getUid()), b.portal_type in transformation_allowed_content_type_list),\n
)\n
result_list.sort(cmp=compare, reverse=True)\n
\n
context.REQUEST.set(\'consumption_dict\', consumption_dict)\n
return result_list\n
</string> </value>
......
2011-06-22 yusei
* Fix material consumption tab. Sort result as user can easily understand.
2011-06-22 yusei
* Fix bug on production order material consumption tab.
......
464
\ No newline at end of file
465
\ 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