Odoo Help

Welcome!

This community 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.

0

How to make a record readonly without editing all forms?

By
Raffaele
on 3/3/15, 8:47 AM 648 views

Hallo

I need to make some calendar.event records read-only, according to values in a custom field.

Is it possible to do that without modifying the forms?

Can I override showing the "Edit" button?

You can set the access rights for that model, by giving only the read access to users right? Otherwise you need to inherit the view in your custom module and using 'attrs' attribute, set the required fields as readonly

Akhil P Sivan
on 3/3/15, 8:58 AM

Thank you Akhil. I was trying to avoid marking each field with "attrs" since there are many; I'm trying overriding fields_view_get but the custom fields are not accessible from within the method.

Raffaele
on 3/3/15, 10:03 AM

Hi,, You want to make a field read-only and its value depends on another field,, am I correct???

Baiju
on 3/3/15, 11:38 PM

Hi Baiju, I need to make the WHOLE record readonly, according to a value in one of the fields. And I would prefer to avoid overriding each edit form.

Raffaele
on 3/4/15, 2:43 AM

any updates? I am looking solution for the same case.

jianxin
on 1/21/16, 4:43 AM

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/3/15, 8:47 AM
Seen: 648 times
Last updated: 3/16/15, 8:10 AM