← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 740132] Re: account/Balance Sheet Report: accounts should show negative balances in case of credit asset or debit liability

 

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':

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/740132

Title:
  account/Balance Sheet Report: accounts should show negative balances
  in case of credit asset or debit liability

Status in OpenERP Modules (addons):
  Opinion

Bug description:
  Hi,

  in 6.0 and in trunk, when the balance sheet report is printed out, it
  is impossible to point out asset accounts with a negative balance or a
  liabilities with a positive balance. Consider the following situation:
  an asset (say, a bank account) which happens to have a negative
  balance does not show up with a negative sum. Therefore, it looks to
  the employee as if the bank account has a positive balance. There are
  a number of other scenarios in which this problem occurs, such as a
  VAT return in case of a net loss.

  Note that the end sum of the balance sheet is correct, but if you add
  up all the numbers manually you end up with a different and wrong
  number (the amounts are simply run through abs() in the RML).

  Regards,
  Stefan.



References