ir.ui.view在odoo中有什么用?
What is the use of ir.ui.view in odoo?
目前正在学习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>
"All objects that use ir.* or res.* as model name are base objects of Odoo. These objects are, most of the time, necessary to the good running of Odoo."
您可以通过谷歌搜索或转到 Odoo 帮助找到它
IR = 信息库
RES = 资源
这是存储在 Odoo 中的两种数据。
资源与您存储在 Odoo 中的 'real world' 中的内容相匹配 - 代表有关合作伙伴、产品或会计交易的信息。
信息存储库用于存储 Odoo 了解如何作为应用程序工作所需的数据 - 定义菜单、windows、视图、向导、数据库表等。
ir.ui.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。我想知道什么是 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>
"All objects that use ir.* or res.* as model name are base objects of Odoo. These objects are, most of the time, necessary to the good running of Odoo."
您可以通过谷歌搜索或转到 Odoo 帮助找到它
IR = 信息库
RES = 资源
这是存储在 Odoo 中的两种数据。
资源与您存储在 Odoo 中的 'real world' 中的内容相匹配 - 代表有关合作伙伴、产品或会计交易的信息。
信息存储库用于存储 Odoo 了解如何作为应用程序工作所需的数据 - 定义菜单、windows、视图、向导、数据库表等。
ir.ui.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>