Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
18074 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

Just like every other model.

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

Awatar
Odrzuć
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'

Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 19
3721
1
cze 24
442
0
lip 22
3720
1
lut 16
4912
6
gru 23
30675