Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Fabien Pinckaers
Hello, [('product_id.category_id','=','Computers')] should work as the many2one fields calls name_search to detect the ID when it detects a string. Thanks, Ovnicraft wrote: > > > 2011/8/2 Jerzy Orłowski > > > Is it possible tu use "django way" values

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Raphael Valyi
Hello Fabien, 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

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Fabien Pinckaers
> 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 > w

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Raphael Valyi
On Thu, Aug 4, 2011 at 7:39 PM, Fabien Pinckaers wrote: > > > 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 [('f

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Fabien Pinckaers
Raphael Valyi wrote: > > > On Thu, Aug 4, 2011 at 7:39 PM, Fabien Pinckaers > wrote: > > > > off-topic but related: today the following test [('foo_ids', > 'contains', > > 'bar')] works with a name based on the name_search stuff. However, > from >

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Raphael Valyi
> > If you do [('foo_ids', 'in', [id,id2])] on a one2many, it checks one for > which an in id foo_ids is in (id, id2). So this is what you expect I guess. > > When you do [('foo_ids', '=', id)], I think it also searches for a > one2many containing an id (not sure, to be tested), so this is also wha

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Jerzy Orłowski
Could you plasese put that that somewhere in the openerp documentation (for 5.0 and 6.0 series)? On 08/05/2011 03:37 AM, Raphael Valyi wrote: If you do [('foo_ids', 'in', [id,id2])] on a one2many, it checks one for which an in id foo_ids is in (id, id2). So this is what you expect

Re: [Openerp-community] set context depending on the current record in ir.actions.act_window

2011-08-04 Thread Ovnicraft
On Thu, Aug 4, 2011 at 8:06 PM, Fabien Pinckaers wrote: > > > Raphael Valyi wrote: > > > > > > On Thu, Aug 4, 2011 at 7:39 PM, Fabien Pinckaers > > wrote: > > > > > > > off-topic but related: today the following test [('foo_ids', > > 'contains', > > > 'bar')]