From f5f7fd3156ea4ff60d4e9ae6bcf6e15940235659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 14 Jul 2009 12:59:30 +0200 Subject: [PATCH] Fix computation of end amounts in General Ledger for issue1108 --- account.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/account.py b/account.py index 8ae0a58b94..c63974bd43 100644 --- a/account.py +++ b/account.py @@ -1252,16 +1252,12 @@ class GeneralLegder(Report): ('fiscalyear', '=', datas['form']['fiscalyear']), ('end_date', '<=', end_period.start_date), ], context=context) - end_period_ids = list(set(end_period_ids).difference( - set(start_period_ids))) if datas['form']['end_period'] not in end_period_ids: end_period_ids.append(datas['form']['end_period']) else: end_period_ids = period_obj.search(cursor, user, [ ('fiscalyear', '=', datas['form']['fiscalyear']), ], context=context) - end_period_ids = list(set(end_period_ids).difference( - set(start_period_ids))) end_context = context.copy() end_context['fiscalyear'] = datas['form']['fiscalyear'] @@ -1295,7 +1291,8 @@ class GeneralLegder(Report): context['id2end_account'] = id2end_account context['digits'] = company.currency.digits context['lines'] = lambda account_id: self.lines(cursor, user, - account_id, end_period_ids, datas['form']['posted'], context) + account_id, list(set(end_period_ids).difference( + set(start_period_ids))), datas['form']['posted'], context) context['company'] = company return super(GeneralLegder, self).parse(cursor, user, report, objects,