It seems like a possible solution is the one line below, and removing references to abs() from the balance sheet rml files when applied to account balances (not balance sheet totals). That leaves modifying the sxw source files, of course
--- account/report/account_balance_sheet.py 2011-01-14 00:11:01 +0000
+++ account/report/account_balance_sheet.py 2011-03-22 12:19:20 +0000
@@ -130,38 +130,40 @@ accounts_temp = []
for account in accounts:
if (account.user_type.report_type) and (account.user_type.report_type == typ): account_dict = { 'id': account.id, 'code': account.code, 'name': account.name, 'level': account.level,
- 'balance':account.balance,
+ 'balance': (account.balance and typ == 'liability' and -1 or 1 ) * account.balance, } currency = account.currency_id and account.currency_id or account.company_id.currency_id if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_dr += account.balance if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_cr += account.balance if data['form']['display_account'] == 'bal_movement':
It seems like a possible solution is the one line below, and removing references to abs() from the balance sheet rml files when applied to account balances (not balance sheet totals). That leaves modifying the sxw source files, of course
--- account/ report/ account_ balance_ sheet.py 2011-01-14 00:11:01 +0000 report/ account_ balance_ sheet.py 2011-03-22 12:19:20 +0000
accounts_ temp = [] user_type. report_ type) and (account. user_type. report_ type == typ):
account_ dict = {
'id' : account.id,
'code' : account.code,
'name' : account.name,
'level' : account.level, :account. balance,
}
currency = account.currency_id and account.currency_id or account. company_ id.currency_ id
if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit):
self. result_ sum_dr += account.balance
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
self. result_ sum_cr += account.balance
if data['form' ]['display_ account' ] == 'bal_movement':
+++ account/
@@ -130,38 +130,40 @@
for account in accounts:
if (account.
- 'balance'
+ 'balance': (account.balance and typ == 'liability' and -1 or 1 ) * account.balance,