DarkSide
DarkSide

Reputation: 113

How to hide a field in editable mode in odoo (version 8 to 15)

In odoo v8, I want some fields to be shown only in view mode but when the user clicks on edit or create, then those fields should be invisible (Only visible in view mode).

Upvotes: 6

Views: 5103

Answers (1)

Bhavya
Bhavya

Reputation: 488

There is an openerp class called oe_read_only.

This will allow you to view the field only when reading the form not in edit mode of the form.

Sample Code:

<field name="name" class="oe_read_only"/>

Upvotes: 19

Related Questions