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

Hello,

I have created 2 Modules; Album and Songs, the Songs has Many2One that connected to Album, so I can specify an album for each song.

Now my question is, How to show songs list from "Songs" module in "Album" module?

I can create Many2Many and link it so songs and select the songs manually, which is not what I'm looking for.

I want them to be shown automatically.

WHERE module_songs.album = module_album.album_name


My odoo is: Odoo Enterprise 15 with Studio

아바타
취소
베스트 답변

Hi  Sam,

Instead of Many2many create a One2many field in Album,

song_list = fields.One2many('song.song', 'album_id', 'Song List')

- album_id is the Many2one you created in Songs

아바타
취소
작성자 베스트 답변

This is exactly what I need, it works perfectly!

Thanks

아바타
취소
관련 게시물 답글 화면 활동
1
3월 22
2305
1
12월 24
3175
2
6월 24
14936
0
2월 24
2204
1
12월 23
2551