Commit a2731573 authored by Jacek Medrzycki's avatar Jacek Medrzycki

shortAccountNumberToFullGapCategory tries to retrive gap root from kw; if not...

shortAccountNumberToFullGapCategory tries to retrive gap root from kw; if not given, then gets gap root from preferences;
FiscalReportCell_doGetInventory provides kw for shortAccountNumberToFullGapCategory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21637 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27d976db
...@@ -108,7 +108,7 @@ for account in accounts :\n ...@@ -108,7 +108,7 @@ for account in accounts :\n
except AttributeError: # no account of this gap nr has been set up\n except AttributeError: # no account of this gap nr has been set up\n
return 0\n return 0\n
# except :\n # except :\n
# raise \'error on\', (account, shortAccountNumberToFullGapCategory(account))\n # raise \'error on\', (account, shortAccountNumberToFullGapCategory(account, **kw))\n
return float ("%.2f"%(sum))\n return float ("%.2f"%(sum))\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -65,12 +65,14 @@ ...@@ -65,12 +65,14 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>\'\'\'crap - should take gap root from preferences\'\'\'\n <value> <string>gap_root = kw.get(\'gap_root\', context.getPortalObject().portal_preferences.getPreferredAccountingTransactionGap())\n
context.log(gap_root)\n
\n \n
parts=[]\n parts=[]\n
for i in range(len(accountNumber)+1):\n for i in range(len(accountNumber)+1):\n
parts.append(accountNumber[:i])\n parts.append(accountNumber[:i])\n
return \'gap/pl/wpkR\'+\'/\'.join(parts)\n context.log(parts)\n
return gap_root+\'/\'.join(parts)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -93,7 +95,7 @@ return \'gap/pl/wpkR\'+\'/\'.join(parts)\n ...@@ -93,7 +95,7 @@ return \'gap/pl/wpkR\'+\'/\'.join(parts)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>accountNumber</string> </value> <value> <string>accountNumber, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -120,12 +122,15 @@ return \'gap/pl/wpkR\'+\'/\'.join(parts)\n ...@@ -120,12 +122,15 @@ return \'gap/pl/wpkR\'+\'/\'.join(parts)\n
<value> <value>
<tuple> <tuple>
<string>accountNumber</string> <string>accountNumber</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>gap_root</string>
<string>parts</string> <string>parts</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>range</string> <string>range</string>
<string>len</string> <string>len</string>
<string>i</string> <string>i</string>
<string>_getattr_</string>
<string>_getitem_</string> <string>_getitem_</string>
</tuple> </tuple>
</value> </value>
......
42 46
\ No newline at end of file \ 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