[FIX]Server Translation: Fixed the issue search on translated field do not return true result, search on tranlsated field fails due to expression parsing which fetches ids from ir_translation as well as working table and UNION of this makes search fruitless, also search fails for in language other then english when you enter part of a string for the field to search.

Hello,

Fixed issue of search on translated field returns wrong result.

Demo:- Install german language -> use german language -> go to supplier listview(to face this issue add/show country field in listview), add advance filter with Land, enthalt nicht(doesn't contains) and value(say for example Belgien)
Result: It doesn't give resule according to filter applied, even though we filter that doesn't contains Belgien still it will give records with Belgien.

Reason: It is due to expression parsing, if field is translateable then we make UNION of res_id from it_translation and same string we search in current working table(i.e. records from currenct working table where filed value not Belgien, in working table field value always be in English source language).

Fixed the issue by making virtual table using WITH query with LEFT JOIN ir_tranlsations, this way we will be able to search on translated field with whole string as well as part of a translated string.

(This branch is simply a copy of lp:~openerp-dev/openobject-server/7.0-opw-592890SearchOnTranlslatebleField-msh, I have changed this branch according to latest server code)

Thanks.

no need to use unaccented value if used in the outer query in fact.