Fix DeprecationWarning: Use __getattr__ instead of __getitem__

This commit is contained in:
Cédric Krier
2012-09-25 11:27:04 +02:00
parent fd23594be2
commit 698e736ed4
+1 -1
View File
@@ -800,7 +800,7 @@ class Account(ModelSQL, ModelView):
if account.id in id2deferral:
deferral = id2deferral[account.id]
for name in names:
res[name][account.id] += deferral[name]
res[name][account.id] += getattr(deferral, name)
else:
with Transaction().set_context(fiscalyear=fiscalyear.id,
date=None, dates=None):