diff --git a/INSTALL b/INSTALL index 01a7294667..e627dbfac1 100644 --- a/INSTALL +++ b/INSTALL @@ -4,7 +4,7 @@ Installing trytond_account Prerequisites ------------- - * Python 2.6 or later (http://www.python.org/) + * Python 2.7 or later (http://www.python.org/) * python-dateutil (http://labix.org/python-dateutil) * python-sql (http://code.google.com/p/python-sql/) * trytond (http://www.tryton.org/) diff --git a/account.py b/account.py index ccad54b0d1..3e5e592796 100644 --- a/account.py +++ b/account.py @@ -674,6 +674,10 @@ class Account(ModelSQL, ModelView): break balances[account_id] = Decimal(str(balance)) + for account in accounts: + balances[account.id] = account.company.currency.round( + balances[account.id]) + fiscalyears = FiscalYear.browse(fiscalyear_ids) func = lambda accounts, names: \ {names[0]: cls.get_balance(accounts, names[0])} @@ -722,6 +726,10 @@ class Account(ModelSQL, ModelView): result[name][account_id] = Decimal(str(row[i])) else: result[name][account_id] = row[i] + for account in accounts: + for name in names: + result[name][account.id] = account.company.currency.round( + result[name][account.id]) if not Transaction().context.get('cumulate'): return result diff --git a/setup.py b/setup.py index 2800cc287a..55dfd1dc83 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,6 @@ setup(name='trytond_account', 'Natural Language :: Slovenian', 'Natural Language :: Spanish', 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Office/Business', 'Topic :: Office/Business :: Financial :: Accounting', diff --git a/tests/scenario_account_reconciliation.rst b/tests/scenario_account_reconciliation.rst index 80b75e4d1a..0e5832a5ae 100644 --- a/tests/scenario_account_reconciliation.rst +++ b/tests/scenario_account_reconciliation.rst @@ -223,5 +223,5 @@ Reconcile Lines with writeoff:: ... if l != writeoff_line1] >>> writeoff_line2.account == expense True - >>> writeoff_line2.debit == Decimal(3) - True + >>> writeoff_line2.debit + Decimal('3.00')