2015-03-18 14:32 GMT+01:00 Cédric Krier <[email protected]>: > On 18 Mar 14:02, Jean C wrote: > > 2015-03-18 14:00 GMT+01:00 jmartin <[email protected]>: > > > > > <field name="domain">[('origin','=', 'account.statement,%s' % > > > Eval('active_id'))]</field> > > > > > > For reference field, you can use a fourth parameter in a domain with the > > model name to match against : > > > > <field name="domain">[('origin.id','=', Eval('active_id'), > > 'account.statement')]</field> > > That's not the optimal way because it will generate a join but you can > use a tuple as value for Reference field: > > [('origin', '=', ('account.statement', Eval('active_id')))] > > > http://doc.tryton.org/3.4/trytond/doc/ref/models/fields.html?highlight=reference#trytond.model.fields.Reference >
Thanks a lot. I see the advantage of not having a join. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: [email protected] > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ > -- Jesús Martín Zikzakmedia SL C/ de Sant Jaume, 9, baixos, 2ª 08720 Vilafranca del Penedès ☏ 93 890 21 08
