From 698e736ed4a5f69cd23c58ff98c8a221db1c1f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 25 Sep 2012 11:27:04 +0200 Subject: [PATCH] Fix DeprecationWarning: Use __getattr__ instead of __getitem__ --- account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account.py b/account.py index 32b8733cd7..92b6bbe7a5 100644 --- a/account.py +++ b/account.py @@ -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):