From 73c60da63f700192d2311bd9b22caaa0671d650d Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Fri, 13 Aug 2010 19:32:11 +0530 Subject: [PATCH] [FIX]: fix a name_search for the account move [REM]: remove unwanred menus bzr revid: mga@tinyerp.com-20100813140211-wvttfoslyo3hhivg --- addons/account/account.py | 8 +++-- addons/account/wizard/account_move_journal.py | 6 ++-- .../wizard/account_move_journal_view.xml | 36 +++++++++---------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 4c754360e89..52bee770bef 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1053,10 +1053,12 @@ class account_move(osv.osv): if not context: context={} ids = [] - + if name: - ids += self.search(cr, user, [('id','=',name)], limit=limit) - + ids += self.search(cr, user, [('name','=',name)], limit=limit) + if not ids: + ids += self.search(cr, user, [('id','=',name)], limit=limit) + return self.name_get(cr, user, ids, context=context) def name_get(self, cursor, user, ids, context=None): diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 0187cfc7b9b..84b152f95ec 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -87,9 +87,11 @@ class account_move_journal(osv.osv_memory): view = """
- + -