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