Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
18044 Zobrazení

When defining a one2many field on a wizard (TransientModel), you need to specify the column of the related model that points to the wizard.

How should I do this in case of a orm.TransientModel?

Avatar
Zrušit
Nejlepší odpověď

Just like every other model.

See the example of wizard.select.move.template and wizard.select.move.template.line

Avatar
Zrušit
Autor

Thanks Lorenzo. But don't you think this foreign key on the 'other' object is strange? What happens if the wizard instance record is removed? Then this foreign key 'template_id' is invalid?

It depends on what referential action you set as 'ondelete'

Related Posts Odpovědi Zobrazení Aktivita
0
zář 19
3686
1
čvn 24
442
0
čvc 22
3710
1
úno 16
4902
6
pro 23
30662