How to acess fields in other model using relational field in view (odoo)

倾然丶 夕夏残阳落幕 提交于 2020-01-07 03:07:42

问题


I've a question concerning relational field in Odoo.

i have a relational field X into modelA (a Many2Many field) related with the modelB, i create a view (viewA.xml) for the ModelA, and i'd like to get acess to field (Y for example) located into modelB using my relational field (X). How to do that in xml view. i've tried to use the dot notation (X.Y), but it doesn't work in xml view.

Thanks in advance.


回答1:


You can access Y only by using the list for X inside the view:

<field name="X">
    <tree>
        <field name="Y">
    </tree>
</field>


来源:https://stackoverflow.com/questions/35430663/how-to-acess-fields-in-other-model-using-relational-field-in-view-odoo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!