title: Get product's name in the local language in OpenERP?
body: <p>This is a very simple but a difficult question to answer, because I think only a "few" people work with this.</p>
  
  <p>I have this simple script in Python:</p>
  
  <pre><code>import xmlrpclib
  
  username = 'my_openerp_user'
  pwd = 'my_password'
  dbname = 'my_openerp_database'
  
  sock = xmlrpclib.ServerProxy('http://localhost:8063/xmlrpc/common')
  uid = sock.login(dbname, username, pwd)
  sock = xmlrpclib.ServerProxy('http://localhost:8063/xmlrpc/object')
  
  args = [('name', 'ilike', 'my_product')]
  ids = sock.execute(dbname, uid, pwd, 'product.product', 'search', args)
  
  print ids
  </code></pre>
  
  <p>It should find all the products in the OpenERP database with the name 'my_product', but it does not. And I know why:</p>
  
  <p>I am not in a country in which English is talked, so I have one language installed in OpenERP, and the 'search' of xmlrpc is looking for products with name 'my_product' but only in english. The problem is that apparently there is not a field to save the translated name... It seems to be 'name' too! So I can't find the products if I specify their names in my language.</p>
  
  <p>Anyone in the world had the same problem?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok, I have a clue: if instead of doing 'search', I do 'read':</p>
  
  <pre><code>product_names = sock.execute(dbname, uid, pwd, 'product.product', 'read', ids, ['name'], {'lang': 'es_ES'})
  </code></pre>
  
  <p>This way I can specify the language and it works! But I can't do the same with 'search', I get errors. Anyone knows the way???</p>
  
  <p><strong>NEW EDIT</strong></p>
  
  <pre><code>context = {'lang': 'es_ES'}
  
  args = [('name', 'ilike', 'my_product')]  # consulta
  
  ids = sock.execute(dbname, uid, pwd, 'product.product', 'search', args, context)
  </code></pre>