← Back to team overview

openerp-community team mailing list archive

Re: set context depending on the current record in ir.actions.act_window

 

> off-topic but related: today the following test [('foo_ids', 'contains',
> 'bar')] works with a name based on the name_search stuff. However, from
> my quick tests if I remember properly, it doesn't work with an id such
> as [('foo_ids', 'contains', id)]. Any chance when an id is provided it
> would then try to match the id? That would be more precise because names
> can be duplicated eventually or a name could also be included in some
> other larger name. What I propose might however conflicts with searching
> a name containing some number. Any specific syntax we could adopt to
> have this working? Thoughts?

Raphaël,

Which type of field ? many2one or one2many ? Contains does not exists, I
think you probably mean 'like' ?

For searching on ids, we don't use 'like' but:
  [('foo_ids', '=', id)]
  [('foo_ids', 'in', [id,id2])]
I don't remember having seen/planned some improvements or changes in
that area.


If you propose an improvement, I would suggest to record on
feedback.openerp.com, our R&D teams does not process every discussions
on mailing lists. They are used to work on feedback.

-- 
Fabien Pinckaers
CEO OpenERP
Chaussée de Namur 40
B-1367 Grand-Rosière
Belgium
Phone: +32.81.81.37.00
Fax: +32.81.73.35.01
Web: http://openerp.com


Follow ups

References