How can I hide Create button from tree view in a specific object? As this object has all the fields readonly.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on which OpenERP version you are working, please mention it if you’d like more specific answers. If you’re asking this question you’re probably not using 7.0 yet, but it might be useful to know nevertheless.
OpenERP 7.0
As of OpenERP 7.0 the system will automatically do this for you for each of the following possible actions: create, edit, delete: if the current user has no access (based on the Access Rights configuration) the corresponding flag will be added to the root node of the view definition, effectively hiding the option in the UI.
These flags correspond respectively to the following access rights:
create,write,unlink.As user1576199 mentioned, this flag could also be set manually in your view definition, but that should only be required when the access rights do not correspond to the options you want to show. You could do it in this manner, in any combination:
OpenERP 6.1 and earlier
There is no option to hide these buttons, so you’ll need to customize the OpenERP client(s) if you want to specifically achieve that. simahawk’s answer gave you some starting points for the web client 6.1, which is probably what you want to customize.