Commit a1818daa authored by Tatuya Kamada's avatar Tatuya Kamada

Fix the issue that the Stock tab in Production Order or Production Packing...

Fix the issue that the Stock tab in Production Order or Production Packing List returns all the inventories when the Deliveries do not have a resource.
parent e7e1ba71
......@@ -52,6 +52,18 @@
<key> <string>_body</string> </key>
<value> <string>"""List Method script to show only inventory for destination"""\n
\n
# When the delivery does not have a resource, returns empty list.\n
# Otherwise it returns all the inventories in your ERP5 site.\n
production_delivery = context\n
movement_list = production_delivery.getMovementList()\n
empty = True\n
for movement in movement_list:\n
if movement.getResource() not in (None, \'\'):\n
empty = False\n
break \n
if empty:\n
return []\n
\n
portal_type_dict_mapping = {\n
\'Production Order\' : {\'node_uid\' : context.getDestinationUid()},\n
}\n
......
2011-08-30 tatuya
* Fix the issue that the Stock tab in Production Order or Production Packing List returns all the inventories when the Deliveries do not have a resource.
2011-08-30 tatuya
* Fix to show quantity unit title in the listbox of the Stock tab.
......
469
\ No newline at end of file
470
\ 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