Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
18254 Weergaven

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
Annuleer
Beste antwoord

Just like every other model.

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

Avatar
Annuleer
Auteur

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'

Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 19
3817
1
jun. 24
442
0
jul. 22
3828
1
feb. 16
5060
6
dec. 23
30844