Double Field Access??!?
I had a question about the ORM API. I am using the Python interface to Odoo. I am looking at this documentation:\https://www.odoo.com/documentation/11.0/reference/orm.html#field-access
The documentation shows how to access a field like so: table_name.column_name. However, there is another example like this: table_name.column_name.other_column_name. What does this mean? Please let me know if this does not make sense.
Example
>>> record.name Example Name >>> record.company_id.name Company Name >>> record.name = "Bob" >>> field = "name" >>> record[field] BobThe above code shows there is a table called "record". We do not know what columns are in this table however, which adds some confusion. We can see that we can access a column in the "record" table by doing this "record[field]" or like this "record.field". What I am confused about is what this code is doing -> \record.company_id.name. This seems like the code is referencing a column from another column. Something like if "record" is a table name. Then "company_id" is a column name. Then again "name" is also a column name. How does this make sense? What is returned? Why is the example database not shown? Is the example database shown somewhere else that I am missing?
Thank-you for reading this!