From ffcd8f105e03d97ba1e4c560c8a48d358771294b Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 5 Jun 2012 16:20:33 +0530 Subject: [PATCH] [IMP]:resolved account module bzr revid: apa@tinyerp.com-20120605105033-ses82h9j15f94yht --- .../account/wizard/account_invoice_refund.py | 1 + addons/account/wizard/account_move_journal.py | 95 ++++++++++--------- .../account/wizard/account_report_common.py | 1 + 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index fea020b5c4b..98c32eda7ee 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -60,6 +60,7 @@ class account_invoice_refund(osv.osv_memory): } def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): + if context is None:context = {} journal_obj = self.pool.get('account.journal') user_obj = self.pool.get('res.users') # remove the entry with key 'form_view_ref', otherwise fields_view_get crashes diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 6756e0d06c6..a7d4f36916b 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -77,56 +77,57 @@ class account_move_journal(osv.osv_memory): @return: Returns a dict that contains definition for fields, views, and toolbars """ - + if context is None:context = {} res = super(account_move_journal, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) - if not view_id: - return res - - period_pool = self.pool.get('account.period') - journal_pool = self.pool.get('account.journal') - - journal_id = self._get_journal(cr, uid, context) - period_id = self._get_period(cr, uid, context) - - journal = False - if journal_id: - journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name'] - journal_string = _("Journal: %s") % tools.ustr(journal) - else: - journal_string = _("Journal: All") - - period = False - if period_id: - period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] - period_string = _("Period: %s") % tools.ustr(period) - - separator_string = _("Open Journal Items !") - cancel_string = _("Cancel") - open_string = _("Open") - view = """ -
- - - - - - -