From 059a2153f258c39c3833d28c7eee49d3b43fc0f6 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Wed, 12 May 2010 16:28:42 +0530 Subject: [PATCH] [FIX] Account : name_search() of account.tax.code overridden for better search bzr revid: jma@tinyerp.com-20100512105842-t9o7woyqax27qqmp --- addons/account/account.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/account/account.py b/addons/account/account.py index 5c17b3cd84f..4016e06546c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1294,6 +1294,15 @@ class account_tax_code(osv.osv): } + def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): + if not args: + args = [] + if context is None: + context = {} + ids = self.search(cr, user, ['|',('name',operator,name),('code',operator,name)] + args, limit=limit, context=context) + return self.name_get(cr, user, ids, context) + + def name_get(self, cr, uid, ids, context=None): if not len(ids): return []