Odoo Help


How to make a one2many field in a wizard / orm.TransientModel ?

Hannes Smit
on 5/7/13, 7:01 AM 4,863 views

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?

On 5/10/13, 5:21 AM

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?

Hannes Smit
on 5/10/13, 5:35 AM

It depends on what referential action you set as 'ondelete'

on 5/10/13, 7:22 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 5/7/13, 7:01 AM
Seen: 4863 times
Last updated: 3/16/15, 8:10 AM