In Odoo, you can make a field read-only through Python code or XML views, depending on where you want to enforce the read-only behavior. When you set the readonly attribute to True in Python, it makes the field read-only across all views where it’s used. Conversely, when you set readonly=”1″ in XML views, it makes […]
Sometimes in certain cases, we might need to make all fields of a model readonly in a particular state or a condition. This video discusses on how to do that without having to give conditions for each field in the model to be readonly. It’s done bypassing “turn_view_readonly” through context. Watch the full video to […]