Drop support of Python 2.6

review2691002
This commit is contained in:
Cédric Krier
2014-01-31 00:02:55 +01:00
parent 7b343900dc
commit 8959193ca6
4 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -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/)
+8
View File
@@ -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
-1
View File
@@ -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',
+2 -2
View File
@@ -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')