Commit 5569f904 authored by Jérome Perrin's avatar Jérome Perrin

Make sure we have portal_type passed to getInventory*

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14152 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 278792f2
...@@ -95,6 +95,9 @@ if node_category_strict_membership:\n ...@@ -95,6 +95,9 @@ if node_category_strict_membership:\n
if node_category:\n if node_category:\n
params[\'node_category\'] = node_category\n params[\'node_category\'] = node_category\n
\n \n
if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\n
# Create the related accouting line list\n # Create the related accouting line list\n
new_result = []\n new_result = []\n
net_balance = 0.0\n net_balance = 0.0\n
......
...@@ -92,6 +92,9 @@ if kw.get(\'node_category\'):\n ...@@ -92,6 +92,9 @@ if kw.get(\'node_category\'):\n
if kw.get(\'where_expression\'):\n if kw.get(\'where_expression\'):\n
params[\'where_expression\'] = kw[\'where_expression\']\n params[\'where_expression\'] = kw[\'where_expression\']\n
\n \n
if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\n
# For expense or income accounts, we only take into account transactions from the\n # For expense or income accounts, we only take into account transactions from the\n
# beginning of the period.\n # beginning of the period.\n
if params.get(\'period_start_date\', 0) and params.get(\'node_uid\'):\n if params.get(\'period_start_date\', 0) and params.get(\'node_uid\'):\n
......
264 265
\ 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