Community mailing list archives

community@mail.odoo.com

RE: GUI way: Showing a field in two models

by
Bista Solutions US, Ray Carnes
- 03/28/2016 17:09:18

https://www.odoo.com/forum/help-1/question/99820/#answer-99821

 

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.

 

 

From: Luis Panozzo [mailto:luis.panozzo@elmatica.com]
Sent: Monday, March 28, 2016 1:43 PM
To: Community <community@mail.odoo.com>
Subject: GUI way: Showing a field in two models

 

Field ABC belongs to model Sales (to say something)

I want to display it in a formview that is based on model SX1

Is there a NON-PROGRAMMATICAL way of displaying field ABC in that formview?

By this, I mean a construct via a view that I can build using the GUI (an XML statement giving the proper reference?)

 

Luis Panozzo (Lp)

Technology Manager

Elmatica AS

luis.panozzo@elmatica.com
Skype: luispanozzo

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe