diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index b02b017be55..038973c4ed8 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -40,7 +40,10 @@ class account_common_report(osv.osv_memory): 'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), 'date_from': fields.date("Start Date"), 'date_to': fields.date("End Date"), - } + 'target_move': fields.selection([('all', 'All Entries'), + ('posted', 'All Posted Entries')], 'Target Moves', required=True), + + } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): mod_obj = self.pool.get('ir.model.data') @@ -101,6 +104,7 @@ class account_common_report(osv.osv_memory): 'journal_ids': _get_all_journal, 'filter': 'filter_no', 'chart_account_id': _get_account, + 'target_move': 'all', } def _build_contexts(self, cr, uid, ids, data, context=None): @@ -132,7 +136,7 @@ class account_common_report(osv.osv_memory): data = {} data['ids'] = context.get('active_ids', []) data['model'] = context.get('active_model', 'ir.ui.menu') - data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id'])[0] + data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id', 'target_move'])[0] used_context = self._build_contexts(cr, uid, ids, data, context=context) data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or [] data['form']['used_context'] = used_context diff --git a/addons/account/wizard/account_report_common_view.xml b/addons/account/wizard/account_report_common_view.xml index ec3aa6b227b..b9c629acf28 100644 --- a/addons/account/wizard/account_report_common_view.xml +++ b/addons/account/wizard/account_report_common_view.xml @@ -10,6 +10,7 @@
+ diff --git a/addons/account/wizard/account_report_general_ledger.py b/addons/account/wizard/account_report_general_ledger.py index 37ac27bc2ec..c08894bfadd 100644 --- a/addons/account/wizard/account_report_general_ledger.py +++ b/addons/account/wizard/account_report_general_ledger.py @@ -32,15 +32,12 @@ class account_report_general_ledger(osv.osv_memory): help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'), 'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"), 'sortby': fields.selection([('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')], 'Sort By', required=True), - 'target_move': fields.selection([('all', 'All Entries'), - ('posted', 'All Posted Entries')], 'Target Moves', required=True), } _defaults = { 'landscape': True, 'amount_currency': True, 'sortby': 'sort_date', 'initial_balance': False, - 'target_move': 'all', } def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False, context=None): @@ -53,7 +50,7 @@ class account_report_general_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) - data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby', 'target_move'])[0]) + data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'])[0]) if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record data['form'].update({'initial_balance': False}) if data['form']['landscape']: diff --git a/addons/account/wizard/account_report_general_ledger_view.xml b/addons/account/wizard/account_report_general_ledger_view.xml index 42256912add..b251252851c 100644 --- a/addons/account/wizard/account_report_general_ledger_view.xml +++ b/addons/account/wizard/account_report_general_ledger_view.xml @@ -8,9 +8,8 @@ form - + -