Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4 Replies
18028 Tampilan

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
Buang
Jawaban Terbai

Just like every other model.

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

Avatar
Buang
Penulis

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'

Post Terkait Replies Tampilan Aktivitas
0
Sep 19
3675
1
Jun 24
442
0
Jul 22
3708
1
Feb 16
4890
6
Des 23
30652