Domain on many2many fields

31 views
Skip to first unread message

Simon Klemenc

unread,
Feb 16, 2016, 7:49:56 AM2/16/16
to tryton
Hi there,

I need to filter parties by categories.

considering the following
  -partyA being in groups (a, b)
  -partyB being in groups(a,c)
  -partyC being in groups(b,c)

I was checking the docs for the proper domain, but i was not sure first if i am getting it right:
http://doc.tryton.org/3.4/trytond/doc/topics/domain.html#topics-domain

My current attempt is:
[('categories', 'in', Eval('active_ids'))]

by testing this proves accurate, but i think it could be clarified in the docs as it is not really standard python behavior...

best regards
simon

Cédric Krier

unread,
Feb 16, 2016, 9:00:05 AM2/16/16
to tryton
On 2016-02-16 04:49, Simon Klemenc wrote:
> Hi there,
>
> I need to filter parties by categories.
>
> considering the following
> -partyA being in groups (a, b)
> -partyB being in groups(a,c)
> -partyC being in groups(b,c)
>
> I was checking the docs for the proper domain, but i was not sure first if
> i am getting it right:
> http://doc.tryton.org/3.4/trytond/doc/topics/domain.html#topics-domain
>
> My current attempt is:
>
>
> *[('categories', 'in', Eval('active_ids'))]*by testing this proves
> accurate, but i think it could be clarified in the docs as it is not really
> standard python behavior...

Patch is welcomed.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages