Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
18154 Visualizzazioni

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
Abbandona
Risposta migliore

Just like every other model.

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

Avatar
Abbandona
Autore

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 correlati Risposte Visualizzazioni Attività
0
set 19
3750
1
giu 24
442
0
lug 22
3748
1
feb 16
4963
6
dic 23
30719