Commit 62025600 authored by Jérome Perrin's avatar Jérome Perrin

add account_id and account_title as "more column" to make this listbox

reusable.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11773 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a71c5643
......@@ -84,18 +84,21 @@ for origin in origin_list:\n
items = values.items()\n
items.sort()\n
for (sheet, account_url), total_price in items:\n
account_title = portal.restrictedTraverse(account_url\n
).Account_getFormattedTitle()\n
debit = max(total_price, 0)\n
account = portal.restrictedTraverse(account_url)\n
\n
# XXX assume a precision of 2 places, because we use EUR for M9\n
debit = round(max(total_price, 0), 2)\n
total_debit += debit\n
credit = -min(total_price, 0)\n
credit = round(-min(total_price, 0), 2)\n
total_credit += credit\n
line_list.append(Object(uid=\'new_\',\n
origin=origin,\n
sheet=sheet,\n
account_id=account.getId(),\n
account_title=account.getTitle(),\n
account=account.Account_getFormattedTitle(),\n
debit=debit,\n
credit=credit,\n
account=account_title))\n
credit=credit))\n
\n
cache_storage[\'m9_report_per_origin_and_sheet_summary_total_debit\'] = total_debit\n
cache_storage[\'m9_report_per_origin_and_sheet_summary_total_credit\'] = total_credit\n
......@@ -162,7 +165,8 @@ return line_list\n
<string>sheet</string>
<string>account_url</string>
<string>total_price</string>
<string>account_title</string>
<string>account</string>
<string>round</string>
<string>max</string>
<string>debit</string>
<string>min</string>
......
......@@ -312,7 +312,16 @@
<item>
<key> <string>all_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>account_id</string>
<string>Account ID</string>
</tuple>
<tuple>
<string>account_title</string>
<string>Account Name</string>
</tuple>
</list>
</value>
</item>
<item>
......
61
\ No newline at end of file
63
\ 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