From 5569f904ca6ffaf156c05ec2a6225dadb190d978 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 20 Apr 2007 23:38:07 +0000
Subject: [PATCH] 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
---
 .../erp5_accounting/Node_getAccountingTransactionList.xml      | 3 +++
 .../erp5_accounting/Node_statAccountingBalance.xml             | 3 +++
 bt5/erp5_accounting/bt/revision                                | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
index f76fc4de5e..7f01fe34ab 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
@@ -95,6 +95,9 @@ if node_category_strict_membership:\n
 if node_category:\n
   params[\'node_category\'] = node_category\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
 new_result  = []\n
 net_balance = 0.0\n
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
index f9a669d50e..30d0b9d5a4 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
@@ -92,6 +92,9 @@ if kw.get(\'node_category\'):\n
 if kw.get(\'where_expression\'):\n
   params[\'where_expression\'] = kw[\'where_expression\']\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
 # beginning of the period.\n
 if params.get(\'period_start_date\', 0) and params.get(\'node_uid\'):\n
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 44dfb1d0bc..b1ef57c1f7 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-264
\ No newline at end of file
+265
\ No newline at end of file
-- 
2.30.9