Odoo Help


Fetch the customer while creating a new form

Mohammed Roshan
on 2/12/15, 4:31 AM 483 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


Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 5 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 2/12/15, 4:46 AM

<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

Mohammed Roshan
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: 483 times
Last updated: 3/16/15, 8:10 AM