跳至内容
菜单
此问题已终结
2 回复
2517 查看

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
2211
1
12月 24
3060
2
6月 24
14788
0
2月 24
2115
1
12月 23
2402