[FIX] res.groups: ensure predictable sort order
authorOlivier Dony <odo@openerp.com>
Wed, 22 May 2013 16:32:01 +0000 (18:32 +0200)
committerOlivier Dony <odo@openerp.com>
Wed, 22 May 2013 16:32:01 +0000 (18:32 +0200)
Unfortunately the group names are translatable,
and the display name is based on the hierarchy
of groups, so this will not give a satisfactory
result. What we would need ideally is to be able
to sort on the translated "full name" value,
but this is not supported by the ORM yet.
But a stable order is still better than no
order at all

bzr revid: odo@openerp.com-20130522163201-f9zo7xnjvbs2mi97

openerp/addons/base/res/res_users.py

index b0040d7..e5d55e5 100644 (file)
@@ -38,6 +38,7 @@ class groups(osv.osv):
     _name = "res.groups"
     _description = "Access Groups"
     _rec_name = 'full_name'
+    _order = 'name'
 
     def _get_full_name(self, cr, uid, ids, field, arg, context=None):
         res = {}