From f3e65a27b91e8cf8ad62b33e899f2b753276c543 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 14 Jul 2010 11:36:18 +0530 Subject: [PATCH] [IMP] currency field on partner ledger add bzr revid: mra@mra-laptop-20100714060618-ianctg6f9mgh2519 --- addons/account/wizard/account_common_journal_report.py | 1 + addons/account/wizard/account_third_party_ledger.py | 3 ++- addons/account/wizard/account_third_party_ledger.xml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/wizard/account_common_journal_report.py b/addons/account/wizard/account_common_journal_report.py index 4e8639d7b4b..7777919e741 100644 --- a/addons/account/wizard/account_common_journal_report.py +++ b/addons/account/wizard/account_common_journal_report.py @@ -36,6 +36,7 @@ class account_common_journal_report(osv.osv_memory): return result def pre_print_report(self, cr, uid, ids, data, query_line, context=None): + data['form'].update(self.read(cr, uid, ids, ['amount_currency'])[0]) fy_ids = data['form']['fiscalyear_id'] and [data['form']['fiscalyear_id']] or self.pool.get('account.fiscalyear').search(cr, uid, [('state', '=', 'draft')], context=context) period_list = data['form']['periods'] or self.pool.get('account.period').search(cr, uid, [('fiscalyear_id', 'in', fy_ids)], context=context) data['form']['active_ids'] = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', data['form']['journal_ids']), ('period_id', 'in', period_list)], context=context) diff --git a/addons/account/wizard/account_third_party_ledger.py b/addons/account/wizard/account_third_party_ledger.py index 2a06eab9f26..6fbc22d7197 100644 --- a/addons/account/wizard/account_third_party_ledger.py +++ b/addons/account/wizard/account_third_party_ledger.py @@ -32,6 +32,7 @@ class account_partner_ledger(osv.osv_memory): 'soldeinit': fields.boolean('Include initial balances'), 'reconcil': fields.boolean('Include Reconciled Entries'), 'page_split': fields.boolean('One Partner Per Page'), + 'amount_currency': fields.boolean("With Currency", help='Print report with currency column'), } _defaults = { 'reconcile' : True, @@ -57,7 +58,7 @@ class account_partner_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, query_line, context=context) - data['form'].update(self.read(cr, uid, ids, ['soldeinit', 'reconcil', 'page_split'])[0]) + data['form'].update(self.read(cr, uid, ids, ['soldeinit', 'reconcil', 'page_split', 'amount_currency'])[0]) if data['form']['filter'] == 'filter_date': self._check_date(cr, uid, data, context) if data['form']['page_split']: diff --git a/addons/account/wizard/account_third_party_ledger.xml b/addons/account/wizard/account_third_party_ledger.xml index d3e75ff2926..8f05f302def 100644 --- a/addons/account/wizard/account_third_party_ledger.xml +++ b/addons/account/wizard/account_third_party_ledger.xml @@ -13,6 +13,7 @@ +