Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

like image 633
DarkSide Avatar asked Jul 05 '16 12:07

DarkSide


1 Answers

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"/>
like image 175
Bhavya Avatar answered Oct 14 '22 23:10

Bhavya