[IMP] Limit for name_search() improved to 100
lp bug: https://launchpad.net/bugs/494401 fixed bzr revid: jvo@tinyerp.com-20091209114334-tppzivue2orjkcn9
This commit is contained in:
parent
5c1672ba27
commit
bbff6faaa9
|
@ -349,7 +349,7 @@ class account_account(osv.osv):
|
|||
_sql_constraints = [
|
||||
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
|
||||
]
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args = []
|
||||
if not context:
|
||||
|
@ -503,7 +503,7 @@ class account_journal(osv.osv):
|
|||
# })
|
||||
return journal_id
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -878,7 +878,7 @@ class account_invoice(osv.osv):
|
|||
}
|
||||
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if context is None:
|
||||
|
|
|
@ -248,7 +248,7 @@ class account_analytic_account(osv.osv):
|
|||
res['value']['partner_id'] = partner
|
||||
return res
|
||||
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -122,7 +122,7 @@ class account_analytic_plan_instance(osv.osv):
|
|||
res.append((inst.id, name))
|
||||
return res
|
||||
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
|
||||
args= args or []
|
||||
if name:
|
||||
ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context or {})
|
||||
|
|
|
@ -192,7 +192,7 @@ class account_report(osv.osv):
|
|||
'type': lambda *args: 'indicator',
|
||||
}
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -103,7 +103,7 @@ class account_report_bs(osv.osv):
|
|||
'font_style': lambda *a :'',
|
||||
}
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -441,7 +441,7 @@ class account_voucher(osv.osv):
|
|||
}
|
||||
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -500,7 +500,7 @@ class product_product(osv.osv):
|
|||
result = map(_name_get, self.read(cr, user, ids, ['variants','name','default_code'], context))
|
||||
return result
|
||||
|
||||
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -119,7 +119,7 @@ class scrum_product_backlog(osv.osv):
|
|||
_name = 'scrum.product.backlog'
|
||||
_description = 'Product Backlog'
|
||||
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args=[]
|
||||
if not context:
|
||||
|
|
|
@ -349,7 +349,7 @@ class stock_tracking(osv.osv):
|
|||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
}
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
if not args:
|
||||
args = []
|
||||
if not context:
|
||||
|
|
Loading…
Reference in New Issue