[REF] Account : name_search of journal improved
bzr revid: jvo@tinyerp.com-20100519103259-1q2nvi3h1s01sgeg
This commit is contained in:
parent
625135be55
commit
36e487fef0
|
@ -563,15 +563,16 @@ class account_journal(osv.osv):
|
|||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
args = []
|
||||
if context is None:
|
||||
context={}
|
||||
context = {}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
account_journal()
|
||||
|
||||
class account_fiscalyear(osv.osv):
|
||||
|
|
Loading…
Reference in New Issue