Commit 132827cc authored by Jérome Perrin's avatar Jérome Perrin

use editable fields for display on AccountModule_viewAccountList



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12441 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 47d12af2
...@@ -82,6 +82,11 @@ if not id:\n ...@@ -82,6 +82,11 @@ if not id:\n
\n \n
kwd[\'select_expression\'] = "\'%s\' AS accounting_transaction_line_currency" % id\n kwd[\'select_expression\'] = "\'%s\' AS accounting_transaction_line_currency" % id\n
\n \n
# precision for editable fields\n
params = context.ERP5Accounting_getParams(selection)\n
if params.get(\'precision\', None) is not None:\n
context.REQUEST.set(\'precision\', params[\'precision\'])\n
\n
# XXX workaround for #458, we rewrite sort_on id to sort_on using\n # XXX workaround for #458, we rewrite sort_on id to sort_on using\n
# strict_membership.\n # strict_membership.\n
new_sort_on = []\n new_sort_on = []\n
...@@ -112,7 +117,7 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n ...@@ -112,7 +117,7 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>sort_on=None, **kwd</string> </value> <value> <string>sort_on=None, selection=None, **kwd</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -132,13 +137,14 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n ...@@ -132,13 +137,14 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>sort_on</string> <string>sort_on</string>
<string>selection</string>
<string>kwd</string> <string>kwd</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>currency</string> <string>currency</string>
...@@ -146,12 +152,13 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n ...@@ -146,12 +152,13 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n
<string>id</string> <string>id</string>
<string>KeyError</string> <string>KeyError</string>
<string>_write_</string> <string>_write_</string>
<string>new_sort_on</string> <string>context</string>
<string>params</string>
<string>None</string> <string>None</string>
<string>new_sort_on</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>sort_on_item</string> <string>sort_on_item</string>
<string>_apply_</string> <string>_apply_</string>
<string>context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -165,6 +172,7 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n ...@@ -165,6 +172,7 @@ return context.portal_catalog(sort_on=new_sort_on, **kwd)\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
<value> <value>
<list> <list>
<string>listbox_preferred_gap_id</string> <string>listbox_preferred_gap_id</string>
<string>listbox_debit</string>
<string>listbox_credit</string>
<string>listbox_credit_balance</string>
<string>listbox_debit_balance</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -354,12 +354,12 @@ ...@@ -354,12 +354,12 @@
<string>Count</string> <string>Count</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceCredit</string> <string>debit</string>
<string>Credit</string> <string>Debit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceDebit</string> <string>credit</string>
<string>Debit</string> <string>Credit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>accounting_transaction_line_currency</string> <string>accounting_transaction_line_currency</string>
...@@ -423,19 +423,19 @@ ...@@ -423,19 +423,19 @@
<string>Count</string> <string>Count</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceDebit</string> <string>debit</string>
<string>Debit</string> <string>Debit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceCredit</string> <string>credit</string>
<string>Credit</string> <string>Credit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getDebitBalance</string> <string>debit_balance</string>
<string>Debit Balance</string> <string>Debit Balance</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getCreditBalance</string> <string>credit_balance</string>
<string>Credit Balance</string> <string>Credit Balance</string>
</tuple> </tuple>
</list> </list>
...@@ -495,7 +495,24 @@ ...@@ -495,7 +495,24 @@
<item> <item>
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>debit</string>
<string>debit</string>
</tuple>
<tuple>
<string>credit</string>
<string>credit</string>
</tuple>
<tuple>
<string>debit_balance</string>
<string>debit_balance</string>
</tuple>
<tuple>
<string>credit_balance</string>
<string>credit_balance</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -647,11 +664,11 @@ ...@@ -647,11 +664,11 @@
<string>AccountModule_statAccountingTransactionCount</string> <string>AccountModule_statAccountingTransactionCount</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceDebit</string> <string>debit</string>
<string>AccountModule_statTotalSourceDebit</string> <string>AccountModule_statTotalSourceDebit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceCredit</string> <string>credit</string>
<string>AccountModule_statTotalSourceCredit</string> <string>AccountModule_statTotalSourceCredit</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -688,11 +705,11 @@ ...@@ -688,11 +705,11 @@
<string>AccountModule_getTransactionListUrl</string> <string>AccountModule_getTransactionListUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceCredit</string> <string>debit</string>
<string>AccountModule_getTransactionListUrl</string> <string>AccountModule_getTransactionListUrl</string>
</tuple> </tuple>
<tuple> <tuple>
<string>AccountModule_getTotalSourceDebit</string> <string>credit</string>
<string>AccountModule_getTransactionListUrl</string> <string>AccountModule_getTransactionListUrl</string>
</tuple> </tuple>
</list> </list>
......
168 169
\ 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