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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
https://www.odoo.com/forum/help-1/question/insert-one2many-in-wizard-transientmodel-104377
Look at this answer.
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'
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 9 19
|
3760 | ||
|
1
thg 6 24
|
442 | ||
|
0
thg 7 22
|
3765 | ||
|
1
thg 2 16
|
5006 | ||
|
6
thg 12 23
|
30755 |