Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
4 Відповіді
18196 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

Just like every other model.

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

Аватар
Відмінити
Автор

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'

Related Posts Відповіді Переглядів Дія
0
вер. 19
3768
1
черв. 24
442
0
лип. 22
3771
1
лют. 16
5019
6
груд. 23
30785