[IMP] Limit for name_search() improved to 100
lp bug: https://launchpad.net/bugs/494401 fixed bzr revid: jvo@tinyerp.com-20091209114241-e9amr10847awl5zq
This commit is contained in:
parent
b4ba5ed39e
commit
7e22f42485
|
@ -350,7 +350,7 @@ class ir_model_fields(osv.osv):
|
||||||
'complete_name': fields.char('Complete Name', size=64, select=1),
|
'complete_name': fields.char('Complete Name', size=64, select=1),
|
||||||
}
|
}
|
||||||
|
|
||||||
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):
|
||||||
return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit)
|
return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit)
|
||||||
# def get_fields(cr, uid, field, rel):
|
# def get_fields(cr, uid, field, rel):
|
||||||
# result = []
|
# result = []
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Country(osv.osv):
|
||||||
]
|
]
|
||||||
|
|
||||||
def name_search(self, cr, user, name='', args=None, operator='ilike',
|
def name_search(self, cr, user, name='', args=None, operator='ilike',
|
||||||
context=None, limit=80):
|
context=None, limit=100):
|
||||||
if not args:
|
if not args:
|
||||||
args=[]
|
args=[]
|
||||||
if not context:
|
if not context:
|
||||||
|
@ -81,7 +81,7 @@ class CountryState(osv.osv):
|
||||||
help='The state code in three chars.\n', required=True),
|
help='The state code in three chars.\n', required=True),
|
||||||
}
|
}
|
||||||
def name_search(self, cr, user, name='', args=None, operator='ilike',
|
def name_search(self, cr, user, name='', args=None, operator='ilike',
|
||||||
context=None, limit=80):
|
context=None, limit=100):
|
||||||
if not args:
|
if not args:
|
||||||
args = []
|
args = []
|
||||||
if not context:
|
if not context:
|
||||||
|
|
|
@ -199,7 +199,7 @@ class res_partner(osv.osv):
|
||||||
res = [(r['id'], r[rec_name]) for r in self.read(cr, uid, ids, [rec_name], context)]
|
res = [(r['id'], r[rec_name]) for r in self.read(cr, uid, ids, [rec_name], context)]
|
||||||
return res
|
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:
|
if not args:
|
||||||
args=[]
|
args=[]
|
||||||
if not context:
|
if not context:
|
||||||
|
@ -317,7 +317,7 @@ class res_partner_address(osv.osv):
|
||||||
res.append((r['id'], addr.strip() or '/'))
|
res.append((r['id'], addr.strip() or '/'))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
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:
|
if not args:
|
||||||
args=[]
|
args=[]
|
||||||
if not context:
|
if not context:
|
||||||
|
|
|
@ -123,7 +123,7 @@ class res_currency(osv.osv):
|
||||||
else:
|
else:
|
||||||
return (from_amount * rate)
|
return (from_amount * rate)
|
||||||
|
|
||||||
def name_search(self, cr, uid, name, args=[], operator='ilike', context={}, limit=80):
|
def name_search(self, cr, uid, name, args=[], operator='ilike', context={}, limit=100):
|
||||||
args2 = args[:]
|
args2 = args[:]
|
||||||
if name:
|
if name:
|
||||||
args += [('name', operator, name)]
|
args += [('name', operator, name)]
|
||||||
|
|
|
@ -221,7 +221,7 @@ class users(osv.osv):
|
||||||
raise osv.except_osv(_('Can not remove root user!'), _('You can not remove the admin user as it is used internally for resources created by OpenERP (updates, module installation, ...)'))
|
raise osv.except_osv(_('Can not remove root user!'), _('You can not remove the admin user as it is used internally for resources created by OpenERP (updates, module installation, ...)'))
|
||||||
return super(users, self).unlink(cr, uid, ids, context=context)
|
return super(users, self).unlink(cr, uid, ids, context=context)
|
||||||
|
|
||||||
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:
|
if not args:
|
||||||
args=[]
|
args=[]
|
||||||
if not context:
|
if not context:
|
||||||
|
|
|
@ -1455,7 +1455,7 @@ class orm_template(object):
|
||||||
def name_get(self, cr, user, ids, context=None):
|
def name_get(self, cr, user, ids, context=None):
|
||||||
raise _('The name_get method is not implemented on this object !')
|
raise _('The name_get method is not implemented on this object !')
|
||||||
|
|
||||||
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):
|
||||||
raise _('The name_search method is not implemented on this object !')
|
raise _('The name_search method is not implemented on this object !')
|
||||||
|
|
||||||
def copy(self, cr, uid, id, default=None, context=None):
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
|
@ -3194,7 +3194,7 @@ class orm(orm_template):
|
||||||
return [(r['id'], tools.ustr(r[self._rec_name])) for r in self.read(cr, user, ids,
|
return [(r['id'], tools.ustr(r[self._rec_name])) for r in self.read(cr, user, ids,
|
||||||
[self._rec_name], context, load='_classic_write')]
|
[self._rec_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:
|
if not args:
|
||||||
args = []
|
args = []
|
||||||
if not context:
|
if not context:
|
||||||
|
|
Loading…
Reference in New Issue