Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
4 Antworten
18591 Ansichten

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
Verwerfen
Beste Antwort

Just like every other model.

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

Avatar
Verwerfen
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'

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Sept. 19
4134
1
Juni 24
443
0
Juli 22
4084
1
Feb. 16
5408
6
Dez. 23
31189