odoo/odoo — pull request #578 by msh-odoo (2014-06-17 07:06:23+00:00)
Title: 7.0 opw 592890 msh

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.