openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #17076
[Bug 645980] Re: Search() should match the sort order of the context language
In addition to showing results in the wrong order, the selection done on
translated fields is not correct.
For some reason the selection string is not only searched in the
translation of the field, but also in the original English term. This
can lead to returning results that do not contain the selected string at
all!
The SQL executed is for example (statement ormatted for clarity):
SELECT "res_country".id, "res_country".name
FROM res_country
WHERE ((res_country."id" IN
((SELECT res_id
FROM ir_translation
WHERE name = 'res.country,name' AND lang = 'nl_NL'
AND type = 'model' AND value ilike '%Ne%')
UNION (SELECT id
FROM "res_country"
WHERE "name" ilike '%Ne%')))
AND (TRUE OR res_country."id" IS NULL))
ORDER BY name
LIMIT 8
Apart from this the clause AND (TRUE OR res_country."id" IS NULL) seems
to be quite useless. An id field is supposed never to be NULL. Anyway,
what would you do with a NULL is field in your search results?
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/645980
Title:
Search() should match the sort order of the context language
Status in OpenERP Server:
Confirmed
Bug description:
In tree form, suppose you have a column with translated terms.
For example :
Draft > Brouillon
Closed > Clôturé
Open > Ouvert
If, in french interface, we order list items by this values, the order take only the english term to order the lines, so we have
first : "Clôturé"
second : "Brouillon"
third : "Ouvert"
confusing in french...
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/645980/+subscriptions