Odoo Help


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.


what does mean record.company_id.name ?

on 5/23/16, 1:36 AM 165 views

i have read the odoo doc but i didn't understand this line "record.company_id.name" here company_id is model or just a field name,if it is field name then it is possible to access "name" field by company_id field?

Yes, company_id is the field. Yes, It is possible to access company fields by company_id.

Nilesh Sheliya
on 5/23/16, 2:30 AM


| 5 4 7
Bengaluru, India

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 5/23/16, 3:35 AM


Here record represents the object/model, which is in the form of ORM browse_record, which lets to access/traverse its field along with its child fields.


say "record" is "sale.order"

Then lets us consider there are 2 fields "date_order", and "company_id"  present in the object "sale.order"

Now you can access the fields of sale.order by using dot"." notation as follows

"record.date_order" and/or "record.company_id"

However "company_id" is a relation field (i.e many2one) hence you have the privilege to access the fields present in company object as well.

Hence record.company_id.name or record.company_id.[ANYOTHER_FIELDS_OF_COMPANY_OBJECT]

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)


Asked: 5/23/16, 1:36 AM
Seen: 165 times
Last updated: 5/23/16, 7:42 AM