This question has been flagged
2 Replies
7371 Views

Say for example I want to show information from res.partner on another model?

Avatar
Discard
Author Best Answer

Yes – this became possible with version 9.


As long as Model A has a link to Model B via a many2one field, you can add a “related” field to Model A that will hold the data from Model B and allow you to display it in a view based on Model A.

Since a Delivery Order (stock.picking) has a partner_id field relating it back to res.partner, you can add show anything from res.partner via related fields on stock.picking.


·         on the stock.picking model, add a new field x_partner_email:

·         Field Type: char (matches the field type of email on res.partner)

·         Related Field: partner_id.email

 

Now you can add x_partner_email to a stock.picking view and see the email address of the associated partner.

 

Avatar
Discard

This was posible in formers versions of odoo too. As far as I now 6.1, 7, 8 have this feature too. It's not new in v9

V9 is the first version I've seen possible through the UI. It has always been possible with code.

Best Answer

you need to use many2one field

Activate the developer mode

Go To Settings ---> Technical ---> database Structure ---> Models  

Avatar
Discard

hi mohamed can you please tell me how to make a custom field a being existed in two modules for eg in my case : i create a custom field named " objet " with type many2one on sale order and i want to find the value of this field on the invoice. but i dont know what i should put in the case of related objet see pic here : http://s33.postimg.org/7epcz61dr/obe.png please help me i'm using odoo 9 and i want to do this with developer mode. many thanks