Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
18199 Näkymät

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
Hylkää
Paras vastaus

Just like every other model.

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

Avatar
Hylkää
Tekijä

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'

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 19
3768
1
kesäk. 24
442
0
heinäk. 22
3772
1
helmik. 16
5021
6
jouluk. 23
30785