تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
18148 أدوات العرض

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
سبتمبر 19
3744
1
يونيو 24
442
0
يوليو 22
3742
1
فبراير 16
4960
6
ديسمبر 23
30713