Odoo Help


Fetch the customer while creating a new form

on 2/12/15, 4:31 AM 423 views


In project.task we have created a new many2one field file_no.

when we create a new file no, using create and edit in file_no, a new form pops up

What i need is when we create a new file no, i wanna fetch the customer name (partner_id) that i have given in project.task form to the new form.

i have given a partner_id field in the new form too

thanks in advance


<field name="field_no" context={'default_partner_id': partner_id} />

To pass a value available at your FORM to another pop-up, you need to pass the value through CONTEXT.
{'default_FIELDNAME': value @ FORM}  ==> Sets FIELDNAME with value @ FORM

For reference, you can check the Customer window, in which if you try to create a new company for a contact, the values are set using CONTEXT.

Thanks my friend it did work

on 2/12/15, 5:25 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

1 follower(s)


Asked: 2/12/15, 4:31 AM
Seen: 423 times
Last updated: 3/16/15, 8:10 AM