valanto
valanto

Reputation: 921

OpenERP disable editing of field if in edit mode

We need to allow for a field in a view to be visible but not editable in edit mode. is this possible in OpenERP? if not can I at least hide it in edit mode?

Thanks!

Upvotes: 1

Views: 947

Answers (2)

semira
semira

Reputation: 341

another way, you can set read only attribute in pyhton class. like that

'fieldName': fields.char('label name', size=300, readonly=True),

Upvotes: 0

Lukasz Puchala
Lukasz Puchala

Reputation: 476

There is attribute readonly for this. Example from stock.view_production_lot_revision_form:

<field name="author_id" readonly="1"/>

Upvotes: 4

Related Questions