On 28 Mar 19:02, Sergi Almacellas Abellana wrote:
> Hi devs,
> 
> Since changeset [1] is not anymore possible to evaluate the fields
> with the records (and it seems good to me), but the problem presents
> when the target field is a Relate field, as active_id is not
> sufficient to generate the domain on the target record.
> 
> How can I open related records based on reference fields?
> 
> I've tried:
> 
> "[('destination_document', '=', Eval('active_id'))]" which fails
> because active id is the record id, not the string representing the
> id and the query fails.
> 
> and
> 
> "[('destination_document', '=', Eval('active_model') + ',' +
> Eval('active_id'))]"  whichs fails on module instalation

[('destination_document', '=', (Eval('active_model'), Eval('active_id')))]

See
http://doc.tryton.org/3.0/trytond/doc/ref/models/fields.html?highlight=tuple#reference

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgpSdLO48xMz4.pgp
Description: PGP signature

Reply via email to