Odoo能够为给定的模型生成默认视图。在实践中,默认视图对于业务应用程序来说是绝对不可接受的。相反,我们至少应该以合乎逻辑的方式组织各个字段。
视图在带有Actions操作和Menus菜单的 XML 文件中定义。它们是模型的 ir.ui.view
实例。
列表视图
列表视图(也称为树视图)以表格形式显示记录。
Their root element is <tree>
. The most basic version of this view simply lists all the fields to display in the table (where each field is a column):
它们的根元素是 <tree>
。此视图的最基本版本只是列出要在表中显示的所有字段(其中每个字段都是一列):
<tree string="Tests">
<field name=<