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

- do not pass output here, otherwise this report does not work when issued in...

- do not pass output here, otherwise this report does not work when issued in a date that is before the date of the last movement of an item
- pass variation_text to benefit from SQL filtering

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41355 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 433d7952
...@@ -63,21 +63,20 @@ tracking_parameters = dict(\n ...@@ -63,21 +63,20 @@ tracking_parameters = dict(\n
node_uid=brain.node_uid,\n node_uid=brain.node_uid,\n
resource_uid=brain.resource_uid,\n resource_uid=brain.resource_uid,\n
at_date=at_date,\n at_date=at_date,\n
output=True,)\n )\n
\n \n
result_list = []\n result_list = []\n
\n \n
current_variation = context.getVariationCategoryList()\n if context.getVariationCategoryList():\n
tracking_parameters[\'variation_text\'] = brain.variation_text\n
\n
\n \n
for tracking_brain in portal.portal_simulation.getCurrentTrackingList(\n for tracking_brain in portal.portal_simulation.getCurrentTrackingList(\n
**tracking_parameters):\n **tracking_parameters):\n
item = tracking_brain.getObject()\n item = tracking_brain.getObject()\n
\n \n
if current_variation and\\\n item_dict = "%s : %s"% ( item.getReference(),\n
item.Item_getVariationCategoryList(at_date=at_date) != current_variation:\n item.getQuantity(at_date=at_date) )\n
continue\n
\n
item_dict = "%s : %s"% ( item.getReference(), item.getQuantity(at_date=at_date) )\n
result_list.append(item_dict)\n result_list.append(item_dict)\n
\n \n
return result_list\n return result_list\n
...@@ -126,10 +125,9 @@ return result_list\n ...@@ -126,10 +125,9 @@ return result_list\n
<string>request</string> <string>request</string>
<string>brain</string> <string>brain</string>
<string>dict</string> <string>dict</string>
<string>True</string>
<string>tracking_parameters</string> <string>tracking_parameters</string>
<string>result_list</string> <string>result_list</string>
<string>current_variation</string> <string>_write_</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>_apply_</string> <string>_apply_</string>
<string>tracking_brain</string> <string>tracking_brain</string>
......
1088 1089
\ 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