Commit 22de3f73 authored by Jérome Perrin's avatar Jérome Perrin

add a fallback for 'strange' accounts.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13292 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c92556d5
......@@ -126,8 +126,11 @@ def getAccountClass(account_url):\n
except KeyError:\n
account = portal.restrictedTraverse(account_url)\n
# fr / m9 / ${classe} / ...\n
try:\n
classe = account.getGap().split(\'/\')[2]\n
# XXX this can raise with bad account. add a constraint checker on accounts\n
except IndexError:\n
# XXX "bad accounts" will be associated to 9 class\n
classe = \'9\'\n
# XXX also this only work if you have only m9 installed. But anyway, it\'s\n
# not planned to support m9 and other accounting version on the same\n
# instance.\n
......
88
\ No newline at end of file
89
\ 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