Odoo Help


How to show fields from another model

on 4/8/15, 8:31 PM 2,454 views


I’d like to add a field to project.project.form that shows a field I’ve defined in the res.partner model called ‘x_client_code’.

If I just add the field I get a validate error when I try to save the view. I must need to tell it where to find the info, but I don’t know how.

Here’s a link to the code: http://pastebin.com/TSnhUwgM.

Can anyone help please? Thanks.




| 4 4 6
Hyderabad, India

On 5/15/15, 7:45 AM


You have to first take a field(type depends on which data you want to show) in project.project and then 
1) either you can fill its field(field in project.project) value when the original field is bieng updated(in write or create method of original fields master) or
2) you can override the Read method of project.project and write the original fields data into this field
(Note: prefer to go with first menthod)



Hello, Pawan. I have a situation almost identical to the one Anthone had. Only that the original field is in cre,lead (priority) and I want to show that in the sales.order model. I definitely believe the first method is the way to go but have not been able to achieve it yet. I only work with the GUI and do not want to resort to Python or programming. Can you inform about how pass the info from one field to the other? The custom field x_saleorder_priority has been created mimicking the crm.lead priority. Thank you in advance

Elmatica AS, Luis Alberto Panozzo
on 12/28/15, 10:44 AM
On 4/12/15, 7:32 PM

Hi, I'm using version 8. I'm not working in Python. Everything is being done through the web interface by adding to data models and creating or editing existing form views. I'll have a go at creating the related field in project.project class, thanks.


Francesco OpenCode

--Francesco OpenCode--

| 6 8 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/10/15, 10:02 AM

Which version of Odoo are you using?

You need to create a related field in project.project class to read a field from res.partner passing by parter_id field.


could you please show me  the python code ?

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: 4/8/15, 8:31 PM
Seen: 2454 times
Last updated: 4/20/17, 11:15 AM