I want to access data from foreign models via foreign-key from inside .xml-views.
Concrete example: account.invoice.tree
account.invoice model "knows" partner_id as foreign key. I also want to display res.partner.cust_id inside account.invoice.tree. From inside .rml reports, I can simply do o.partner_id.cust_id and the field desired is displayed without needing to inherit the appropriate python class. Can this be achieved like that from within .xml view files and if yes, how?
A view can only display data from a single model.
You can create a new model, which combines information from two others, and is defined by a SQL statement.
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
|Asked: 2/8/14, 2:30 PM|
|Seen: 1779 times|
|Last updated: 3/16/15, 8:10 AM|