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.

1

Changing field restrictions/attributes from UI

By
NT007
on 6/11/15, 4:22 AM 867 views

I understand that in order to customise attributes of a field (e.g. make the field read-only/invisible/mandatory) or to set a group restriction, it is required to add the necessary conditions (i.e. setting the "groups" attribute and the "invisible" or "readonly" attributes) in the code, either in XML level or in Python level.


However, I would like to know whether there is a way to incorporate such changes through a UI, so that later on, say if a certain restriction needs to be removed from a field, it would be possible to do it without changing the code. Or else are there any modules that are developed that would give such capabilities?


Thanks in advance!

1

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 6/11/15, 9:32 AM

you can edit views through ui, using "developer mode".  just activate developer mode (click admin username at right top corner of ui, then in dropdown menu click "About Odoo", then in the popup window click "Activate The Developer Mode")  and then use options provided by developer mode (edit form view, edit tree view, etc...).

Thanks again for your answer Temur! But what I need to know is whether there is any possibility in making fields customizable through the UI without using the developer mode. For example, if the same module is deployed to two clients and if one client wants a certain field to be mandatory and if the other client doesn't, would it be possible to provide something like a different UI under settings or something where the client can simply click a checkbox and say the field should be mandatory or not? I hope my question makes some sense...

NT007
on 6/17/15, 3:04 AM

please see "Settings/Technical/Database Structure/Models" page. maybe it's what you're looking for? If client understands enough what's model/field and can find the right one, then it's possible to click a checkbox to make that field readonly or required at this page.

Temur
on 6/17/15, 3:25 AM

you tried option "manage views" in "developer mode" ? here also used checkboxes for Required/Readonly/Invisible and so on... use developer mode, click "manage views" then in opened window click "edit" then find field you want to edit and click edit button at right side of list in the row (third button).

Temur
on 6/17/15, 3:44 AM
0
NT007
On 6/14/15, 1:03 AM

In my honest opinion it is silly that this community has a restriction of requiring 30 karma to comment on an answer, because it won't allow the person with less than 30 karma like myself asking the question to further clarify any doubts he/she has or further elaborate his question so that the person who is answering can get a clear idea. Hence I have no option but to put my comment as an answer, I apologise for that.

Thank you Temur for taking the time to answer my question. Having said that, I do not know who picked this as the accepted answer because clearly I didn't do it. Whether my account is compromised is something I have to look into, in which case, I apologise again. And this is not the answer I was looking for either.

What I need to know is without asking the client to access the developer mode, whether there is any other option he/she can use to change the attributes of fields in a given form.

Eg, In the HR recruitment module, the Name of the applicant is mandatory while the work phone is not. Let's assume that the client wants to make the work phone mandatory as well. Is there a way where he/she can do that without using developer mode? Are there any modules developed which provide such functionality?

I upvoted your question, so you've enough karma to comment.

Temur
on 6/17/15, 2:45 AM

anyone with high karma can mark answers as accepted so it was reviewed from someone with high karma and marked as accepted... don't worry for your account, it should not be compromised.

Temur
on 6/17/15, 2:48 AM

I read once again your question and I've got feeling that you're describing the "developer mode". everything you're asking for is possible to do using developer mode from UI, change field properties, make field mandatory, invisible, readonly, and vice versa. and it's without necessity to access a code or xml files as you asked. I think "developer mode" is closest thing to your requirements for now. Please update your answer if you'll find a better way.

Temur
on 6/17/15, 3:02 AM

I see... Thanks for your help Temur! :) I added the comment to your answer.

NT007
on 6/17/15, 3:05 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

1 follower(s)

Stats

Asked: 6/11/15, 4:22 AM
Seen: 867 times
Last updated: 6/17/15, 3:16 AM