Odoo Help


This community 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.


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

Hannes Smit
on 5/7/13, 7:01 AM 3,072 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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