Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
2524 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 22
2231
1
дек. 24
3065
2
июн. 24
14809
0
февр. 24
2128
1
дек. 23
2421