Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
7939 Vizualizări

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])]"

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Autor

Thank you! That work :)

Cel mai bun răspuns

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

Hope it helps, Thanks

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

Wrong propose. Don't work :(

Related Posts Răspunsuri Vizualizări Activitate
0
apr. 23
5288
0
iun. 22
2958
2
mai 24
9286
0
mar. 23
2193
0
apr. 22
3709