Odoo 9:如何在编辑表单中显示一个字段而不是在标准视图中显示?

Odoo 9: How to have a field displayed in edit form but not in the standard view?

我创建了一个模块,它定义了一些字段并通过视图 .xml 文件显示它们。我怎样才能使其中两个字段(仅用于计算另一个字段中的值)仅在编辑记录时显示,而不是在显示记录时显示?

您可以使用 css class oe_edit_only.

<field name="editable_field_name" class="oe_edit_only"/>

这 class 确保字段仅在处于可编辑形式时显示。