Odoo Help

Welcome!

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.

0

How to show fields from another model

By
Anthony
on 4/8/15, 8:31 PM 1,263 views

Hi,

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.

0

Pawan

--Pawan--
1267
| 4 3 5
Hyderabad, India
--Pawan--


Pawan
On 5/15/15, 7:45 AM

 John,

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)


Thanks

Pawan

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
0
Anthony
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.

0

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 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.

0

could you please show me  the python code ?

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

1 follower(s)

Stats

Asked: 4/8/15, 8:31 PM
Seen: 1263 times
Last updated: 5/15/15, 7:45 AM