Commit e959698b authored by Łukasz Nowak's avatar Łukasz Nowak

- added support for src__ parameter

- use stock instead of movement table

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22443 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bf9d3471
......@@ -85,19 +85,22 @@ if omit_order_resources:\n
if q.getResourceUid() is not None]\n
\n
query = NegatedQuery(\n
Query(operator=\'IN\',**{\'movement.resource_uid\':ignored_resource_uid_list})\n
Query(operator=\'IN\',**{\'stock.resource_uid\':ignored_resource_uid_list})\n
)\n
\n
kw.update(**query.asSQLExpression())\n
\n
kw[\'explanation_uid\'] = [context.getUid()] + [q.getUid() for q in \\\n
context.getCausalityRelatedValueList(portal_type=context.getPortalDeliveryTypeList())]\n
\n
kw[\'group_by_date\'] = 1\n
kw[\'group_by_node\'] = 1\n
kw[\'group_by_variation\'] = 1\n
kw[\'group_by_resource\'] = 1\n
kwargs.update(**kw)\n
# XXX: below filtering to be replaced by HAVING expression\n
if kwargs.get(\'src__\',0) == 1:\n
return simulation_tool.getFutureInventoryList(*args,**kwargs)\n
return [q for q in simulation_tool.getFutureInventoryList(*args,**kwargs) if q.inventory < 0.0]\n
......
357
\ No newline at end of file
358
\ 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