跳至內容
選單
此問題已被標幟
4 回覆
18174 瀏覽次數

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'

相關帖文 回覆 瀏覽次數 活動
0
9月 19
3755
1
6月 24
442
0
7月 22
3750
1
2月 16
4968
6
12月 23
30722