[Erp5-report] r6385 - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_ac...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Mar 31 01:51:52 CEST 2006


Author: kevin
Date: Fri Mar 31 01:51:51 2006
New Revision: 6385

URL: http://svn.erp5.org?rev=6385&view=rev
Log:
Updated to support wrong values.

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionGapId.xml

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionGapId.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionGapId.xml?rev=6385&r1=6384&r2=6385&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionGapId.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionGapId.xml Fri Mar 31 01:51:51 2006
@@ -66,9 +66,16 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>account_uid = brain.account_uid\n
-account = context.portal_catalog.getObject(account_uid)\n
-return account.Account_getGapId()\n
+            <value> <string>if None not in (brain, selection):\n
+  try:\n
+    account_uid = brain.account_uid\n
+  except AttributeError:\n
+    account_uid = None\n
+  if account_uid != None:\n
+    account = context.portal_catalog.getObject(account_uid)\n
+    if account != None:\n
+      return account.Account_getGapId()\n
+return None\n
 </string> </value>
         </item>
         <item>
@@ -111,8 +118,10 @@
                           <tuple>
                             <string>brain</string>
                             <string>selection</string>
+                            <string>None</string>
                             <string>_getattr_</string>
                             <string>account_uid</string>
+                            <string>AttributeError</string>
                             <string>context</string>
                             <string>account</string>
                           </tuple>




More information about the Erp5-report mailing list