On 2017-06-13 10:24, Khurram Shahzad wrote:
> Dear All,
> 
> I have defined a domain for a filed as follows:
> 
> blood_bags = fields.Many2Many('anth.request-bag', 'blood_request',
> 'blood_bag', 'Blood Bags', required=True,
> domain=[('state','=','cross_matched'), ('id', 'in', [1,2])])
> 
> Consider condition ('id', 'in', [1,2]) where I have hard-coded values 1 &
> 2. Is there a way that I can search a model and use the returned list here
> dynamically.

If those records have been created using XML data then you can use the
pyson.Id [1]. Otherwise you have to find a way to express the domain
using dot notation.


[1] http://doc.tryton.org/4.4/trytond/doc/ref/pyson.html?#trytond.pyson.Id

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20170613063211.GQ3591%40kei.

Reply via email to