Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
9228 Visualizzazioni

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

Avatar
Abbandona
Autore Risposta migliore

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
Abbandona

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.

Risposta migliore

you need to use many2one field

Activate the developer mode

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

Avatar
Abbandona

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

Post correlati Risposte Visualizzazioni Attività
2
apr 24
1326
1
set 16
9612
0
mar 15
3387
5
apr 20
11624
0
giu 19
4648