Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
7858 Zobrazení

Is it possible define in form view dynamic domain for multiple IDs, like (this don't work):

<field name="category_ids"/>
<field name="task_id" domain="[('category_id','in',category_ids)]"

For static domain it work:

<field name="category_ids"/>
<field name="task_id" domain="[('category_id','in',[1,2])]"

Avatar
Zrušit
Nejlepší odpověď

It should be [('category_id','in',category_ids[0][2])].  I presume category_ids is either one2many or many2many fields.  Entries in those type of fields are usually represented as [(6, 0, [id1, id2, ...])].  By getting category_ids[0][2] you'll get the [id1, id2, ...] part.

Avatar
Zrušit
Autor

Thank you! That work :)

Nejlepší odpověď

You can follow this: https://youtu.be/XGqXEL2qQmE 

Hope it helps, Thanks

Avatar
Zrušit
Nejlepší odpověď

Hello Vasiliy Birukov,

I think you are written wrong syntax.

so i will be write this line will be help you.

<field name="task_id" domain="[('category_id', 'in', (category_ids))]" />

Regards,

Ankit H Gandhi

Avatar
Zrušit
Autor

Wrong propose. Don't work :(

Related Posts Odpovědi Zobrazení Aktivita
0
dub 23
5234
0
čvn 22
2896
2
kvě 24
9195
0
bře 23
2123
0
dub 22
3613