콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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

아바타
취소
베스트 답변

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.

아바타
취소
작성자

Thank you! That work :)

베스트 답변

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

Hope it helps, Thanks

아바타
취소
베스트 답변

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

아바타
취소
작성자

Wrong propose. Don't work :(

관련 게시물 답글 화면 활동
0
4월 23
5302
0
6월 22
2983
2
5월 24
9326
0
3월 23
2226
0
4월 22
3727