Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Does like changed in Odoo?

by
Atchuthan - Technical Consultant, Sodexis Inc
- 05/04/2015 01:30:54
To do a variable condition search, you need to use ILIKE

In XML,
domain="[('name','=ilike','im_%%')]"     ==> starts with character "im_"

In PY,
domain="[('name','=ilike','im_%')]"

On 04/30/2015 07:47 PM, Manuel Vázquez wrote:
<blockquote cite="mid:554238E3.4080308@merchise.org" type="cite">
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