[IMP] ir_needaction: search is now without count but with a limit (to 100), and a simplified order by. This allows much faster queries as postgresql does not have to worry about order and things like that.

bzr revid: tde@openerp.com-20121205140726-z1o4ueclat7y96pl
This commit is contained in:
Thibault Delavallée 2012-12-05 15:07:26 +01:00
parent 1652bb1e83
commit ae6f7b3a08
1 changed files with 1 additions and 1 deletions

View File

@ -61,4 +61,4 @@ class ir_needaction_mixin(osv.AbstractModel):
dom = self._needaction_domain_get(cr, uid, context=context)
if not dom:
return 0
return self.search(cr, uid, (domain or []) + dom, limit=100, context=context, count=True)
return self.search(cr, uid, (domain or []) + dom, limit=100, order='id DESC', context=context)