[FIX] translate: correctly set the translation for menus indirectly named by their...
authorOpenERP <openerp@vmt-hp4520s>
Fri, 17 Dec 2010 12:38:22 +0000 (13:38 +0100)
committerOpenERP <openerp@vmt-hp4520s>
Fri, 17 Dec 2010 12:38:22 +0000 (13:38 +0100)
bzr revid: openerp@vmt-hp4520s-20101217123822-0g5h04fz92fxfn42

bin/tools/translate.py

index 76d41d2..a296f0e 100644 (file)
@@ -933,7 +933,11 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=
                 if obj:
                     if field not in obj.fields_get_keys(cr, uid):
                         continue
-                    ids = obj.search(cr, uid, [(field, '=', dic['src'])])
+                    # Using search() instead of _search() will limit the
+                    # returned list to the ids visible to uid, which is not
+                    # in the extended view group. We want all of them and use
+                    # _search().
+                    ids = obj._search(cr, uid, [(field, '=', dic['src'])])
 
                     # if the resource id (res_id) is in that list, use it,
                     # otherwise use the whole list