From 8e7737c1e2a2c221b85a38268a60760618988e70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 29 Dec 2014 18:15:00 +0000
Subject: [PATCH] accounting: fix error display in
 Alarm_checkPayableAndReceivableAccountGrouped

---
 .../Alarm_checkPayableAndReceivableAccountGrouped.xml         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.xml
index f1d1cd3290..5e9b7208f4 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Alarm_checkPayableAndReceivableAccountGrouped.xml
@@ -61,6 +61,7 @@ from Products.CMFActivity.ActiveResult import ActiveResult\n
 active_process = context.newActiveProcess()\n
 \n
 portal = context.getPortalObject()\n
+getObject = portal.portal_catalog.getObject\n
 \n
 # Section category & strict have to be configured on alarm\n
 section_category = context.getProperty(\'section_category\')\n
@@ -85,11 +86,10 @@ search_params = dict(\n
     group_by_node=True,\n
     grouping_reference=None,\n
     )\n
-    \n
 \n
 for brain in portal.portal_simulation.getInventoryList(**search_params):\n
   if round(brain.total_price, precision) == 0:\n
-    print \'%s has a 0 balance but some not grouped transactions.\' % brain.mirror_section_relative_url\n
+    print \'%s has a 0 balance but some not grouped transactions.\' % getObject(brain.mirror_section_uid).getRelativeUrl()\n
     if fixit:\n
       tr = brain.getObject().getParentValue()\n
       grouped_line_list = tr.AccountingTransaction_guessGroupedLines()\n
-- 
2.30.9