diff --git a/modules/account/__init__.py b/modules/account/__init__.py
index 3e8d0f2..11a8096 100755
--- a/modules/account/__init__.py
+++ b/modules/account/__init__.py
@@ -120,6 +120,7 @@ def register():
Pool.register(
account.AccountTypeStatement,
account.GeneralLedger,
+ account.GeneralLedgerDetailReport,
account.TrialBalance,
account.AgedBalanceReport,
move.GeneralJournal,
diff --git a/modules/account/account.py b/modules/account/account.py
index 1856c08..a21212c 100755
--- a/modules/account/account.py
+++ b/modules/account/account.py
@@ -3145,6 +3145,52 @@ class GeneralLedger(Report):
return report_context
+class GeneralLedgerDetailReport(Report):
+ __name__ = 'account.general_ledger.detail.report'
+
+ @classmethod
+ def get_context(cls, records, header, data):
+ pool = Pool()
+ Company = pool.get('company.company')
+ Fiscalyear = pool.get('account.fiscalyear')
+ Period = pool.get('account.period')
+ context = Transaction().context
+
+ report_context = super().get_context(records, header, data)
+ report_context['company'] = Company(context['company'])
+ report_context['fiscalyear'] = Fiscalyear(context['fiscalyear'])
+ for period in ['start_period', 'end_period']:
+ if context.get(period):
+ report_context[period] = Period(context[period])
+ else:
+ report_context[period] = None
+ report_context['from_date'] = context.get('from_date')
+ report_context['to_date'] = context.get('to_date')
+ report_context['groups'] = cls._groups(records)
+ return report_context
+
+ @classmethod
+ def _groups(cls, records):
+ groups = []
+ current_key = None
+ current = None
+ for line in records:
+ currency = getattr(line, 'transaction_currency', None)
+ key = (
+ getattr(line, 'account_code', None),
+ getattr(currency, 'id', None))
+ if key != current_key:
+ current = {
+ 'account': line.account_code or line.account_name or '',
+ 'currency': currency,
+ 'lines': [],
+ }
+ groups.append(current)
+ current_key = key
+ current['lines'].append(line)
+ return groups
+
+
class TrialBalance(Report):
__name__ = 'account.trial_balance'
diff --git a/modules/account/account.xml b/modules/account/account.xml
index fd22196..2b59e62 100755
--- a/modules/account/account.xml
+++ b/modules/account/account.xml
@@ -823,6 +823,18 @@ this repository contains the full copyright notices and license terms. -->
+
+ General Ledger Detail
+ listed
+ account.general_ledger.detail
+ account.general_ledger.detail.report
+ account/general_ledger_detail.fodt
+
+
+ form_print
+ account.general_ledger.detail,-1
+
+