Odoo Help


How can define modifiers for some fields from interface?

on 11/6/14, 1:43 AM 1,957 views


How can define for example: modifiers="{'readonly': [['state', 'not in, ['draft']]]}" for some fields from interface?


Cant get you.?

on 11/6/14, 5:23 AM

can you give more details, what exactly you want to do?

Emipro Technologies Pvt. Ltd.
on 11/6/14, 5:26 AM

Sudhir Arya (SA)

--Sudhir Arya (SA)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow




Sudhir Arya (SA)
On 11/6/14, 5:58 AM

You can define it on field in xml like this:

<field name="your_field" attrs="{'readonly': [['state', 'not in, ['draft']]]}"/>

Christophe HANON
On 11/6/14, 7:53 AM

From the interface, you can enter developper mode (upper right corner drop down uder the user name - must be admin, abot odoo, clieck on developper mode) then edit the view - good for testing. The issue with this approach is that when the module is updated your modification will disappear. 

If you want to go further search the documentations for view inheritance.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 11/6/14, 1:43 AM
Seen: 1957 times
Last updated: 3/16/15, 8:10 AM