Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
9185 Vistas

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

Avatar
Descartar
Autor Mejor respuesta

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
Descartar

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.

Mejor respuesta

you need to use many2one field

Activate the developer mode

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

Avatar
Descartar

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

Publicaciones relacionadas Respuestas Vistas Actividad
2
abr 24
1314
1
sept 16
9597
0
mar 15
3354
5
abr 20
11598
0
jun 19
4636