目前我正在学习odoo。我想知道什么是ir.ui.view?
这是我的示例代码
<record model="ir.ui.view" id="course_search_view">
<field name="name">course.search</field>
<field name="model">openacademy.course</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="description"/>
</search>
</field>
</record>
最佳答案
IR = 信息库
RES = 资源
这是两种存储在 Odoo 中的数据。
资源与您在 Odoo 中存储的“现实世界”中的某些内容相匹配 - 代表有关合作伙伴、产品或会计交易的信息。
信息存储库用于存储 Odoo 了解如何作为应用程序工作所需的数据 - 定义菜单、窗口、 View 、向导、数据库表等。
ir.ui.view 用于显示字段或树列表的 View
您在 Odoo Documentation 中有更多信息:
Views define the way the records of a model are displayed. Each type of view represents a mode of visualization (a list of records, a graph of their aggregation, …). Views can either be requested generically via their type (e.g. a list of partners) or specifically via their id. For generic requests, the view with the correct type and the lowest priority will be used (so the lowest-priority view of each type is the default view for that type).
<record model="ir.ui.view" id="view_id">
<field name="name">view.name</field>
<field name="model">object_name</field>
<field name="priority" eval="16"/>
<field name="arch" type="xml">
<!-- view content: <form>, <tree>, <graph>, ... -->
[...]
<field name="field_name" />
[...]
</field>
</record>
关于odoo - 在odoo中ir.ui.view有什么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34851930/