DROOM
DROOM

Reputation: 165

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

I have created a module which defines some fields and displays them via a view .xml file. How can I make it so that two of these fields (which are simply used for computing a value in another field) are only displayed when editing a record, but not when displaying it?

Upvotes: 2

Views: 705

Answers (1)

arryph
arryph

Reputation: 2825

You can use css class oe_edit_only.

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

This class ensures that the field is displayed only when in editable form.

Upvotes: 2

Related Questions