Se rendre au contenu
Menu
Cette question a été signalée

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thank you! That work :)

Meilleure réponse

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

Hope it helps, Thanks

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Wrong propose. Don't work :(

Publications associées Réponses Vues Activité
0
avr. 23
5272
0
juin 22
2927
2
mai 24
9243
0
mars 23
2163
0
avr. 22
3684