Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Does like changed in Odoo?

by André P.<app@thinkopen.solutions> - 04/30/2015 10:31:03
The 'like' operator searches for the string in any place of the text (it's equivalent to doing " LIKE '%text%'" in SQL). If you need to do a search that starts with the string, you need to use the '=like' operator.

2015-04-30 15:17 GMT+01:00 Manuel Vázquez <manuel@merchise.org>:
Doing a old-api-like search over the ir_module_module object with the
query [('name', 'like', 'im_%')] is returning ids whose name contains
im, but it does not start with "im_", actually for one of the records
returned the name is "test_limits".

Does the meaning of "like" in queries changed in Odoo?

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--



André Paramés

e.  app@thinkopen.solutions

LISBOA

Avenida das Túlipas,

nº 6, 13º A/B 

1495-161 Algés

t.   +351 808 455 255

PORTUGAL | BRASIL | ANGOLA

PORTO

Rua do Espinheiro,

nº 641, 2 SALA 2.3 

4400-450 V.N. Gaia