odoo - 在odoo中ir.ui.view有什么用?

标签 odoo odoo-8

目前我正在学习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/

相关文章:

python - 有没有一个函数可以再次生成代码,或者更好的想法?

python - Odoo 以编程方式在 python 中为采购订单添加税费

python - 属性错误: 'bool' object has no attribute 'pop' - Odoo v8 to Odoo v10 community

python - 如何在 Odoo 8 中使用 fields_view_get?

openerp - 如何在 Odoo 框架中集成 D3 图表?

Odoo 10 - 从product_uom获取特定记录的id

python - 如何使用 fields_get 方法编辑 View ?

python - 如何从 openerp 中的帐户报告打印单一合作伙伴分类帐报告

python - 域名错误 [odoo 8 ]

postgresql - 单击 Odoo 中的按钮后如何运行 sql 查询?