Commit bcbbf7b0 authored by Jérome Perrin's avatar Jérome Perrin

Only take products into account in stock tab on deliveries

We don't show stocks of services
parent 05a31ffa
...@@ -80,13 +80,14 @@ def getOrderStr(movement_list, resource_value):\n ...@@ -80,13 +80,14 @@ def getOrderStr(movement_list, resource_value):\n
\n \n
return order_str\n return order_str\n
\n \n
\n
movement_dict = {}\n movement_dict = {}\n
for movement in context.getMovementList():\n for movement in context.getMovementList():\n
movement_dict_key = movement.getResourceUid(), tuple(sorted(movement.getVariationCategoryList()))\n resource_value = movement.getResourceValue(portal_type=context.getPortalProductTypeList())\n
if movement_dict_key in movement_dict:\n if resource_value is not None:\n
movement_dict[movement_dict_key].append(movement)\n movement_dict_key = resource_value.getUid(), tuple(sorted(movement.getVariationCategoryList()))\n
else:\n movement_dict.setdefault(movement_dict_key, []).append(movement)\n
movement_dict[movement_dict_key] = [movement]\n \n
\n \n
line_list = []\n line_list = []\n
order_dict = {}\n order_dict = {}\n
...@@ -108,8 +109,6 @@ if movement_dict:\n ...@@ -108,8 +109,6 @@ if movement_dict:\n
for movement_list in movement_dict.values():\n for movement_list in movement_dict.values():\n
for movement in movement_list:\n for movement in movement_list:\n
resource_value = movement.getResourceValue()\n resource_value = movement.getResourceValue()\n
if resource_value is None:\n
continue\n
\n \n
temp_movement = movement.asContext(getCurrentInventory=str,\n temp_movement = movement.asContext(getCurrentInventory=str,\n
getAvailableInventory=str,\n getAvailableInventory=str,\n
......
1167 1168
\ 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