Drop support of Python 2.6
review2691002
This commit is contained in:
@@ -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/)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user