From 8022f5283efadc494ab1cce3c91de34437c1d7c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 6 Feb 2009 13:58:41 +0000
Subject: [PATCH] r24856 was not falling back to gap id correctly. fix this

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25476 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_accounting/Account_getGapId.xml        | 17 +++++++----------
 bt5/erp5_accounting/bt/revision                 |  2 +-
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml
index 30f9978914..838f04a07d 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml
@@ -66,16 +66,13 @@ if number_method == \'account_reference\':\n
   if reference:\n
     return reference\n
 \n
-# elif number_method == \'gap_id\':\n
-else:\n
-  # GAP id is the default rendering\n
-\n
-  current_gap = preference_tool.getPreferredAccountingTransactionGap()\n
-\n
-  for gap in context.getGapValueList() : \n
-    if current_gap in gap.getPath() : \n
-       return gap.getReference() or gap.getId()\n
-  return \'\'\n
+## elif number_method == \'gap_id\':\n
+# GAP id is the default rendering\n
+current_gap = preference_tool.getPreferredAccountingTransactionGap() or \'\'\n
+for gap in context.getGapValueList(): \n
+  if current_gap in gap.getPath(): \n
+     return gap.getReference() or gap.getId()\n
+return \'\'\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index bbf2b7302e..24888beeaa 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-861
\ No newline at end of file
+862
\ No newline at end of file
-- 
2.30.9