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

Prevent from user updating the values of a record

By
José
on 12/10/14, 7:23 AM 453 views

Hello, I have Odoo 8.

I override the "create" method of the model "product.pricelist.item" in which I do some things after the record is created. In updating the record, I have some problems, so I don't want to allow the update. How can I turn off the "save" button when the user is updating, or how to display an error message when the user presses this button?

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 12/10/14, 8:03 AM

Use security groups... 
By putting a user in high security restricted gruoup you can deny him some rights... 
For any field (attribute) of any model you can specify CRUD (create,read,update, delte) rights...

You can modify them in GUI (Settings > Technical > Security 
Or modify then via custom module and import security rules : )

0
José
On 12/10/14, 8:29 AM

Thanks for your answer! And how can I don't allow update action for any user? On all fields of a model

I have created a rule in a custom module: "access_noModificaPriceListItem,access_noModificaPricelistItem,model_product_pricelist_item,,1,0,1,1" . Also I go to Techicanl -> Models -> product.pricelist.item and I uncheck all permissions of write. But the admin user still can modify the record

José
on 12/10/14, 8:46 AM

user admin is "superuser" with "supercow" privileges : ) closest thing to root user in linux, or admininistrator on windows... he is actualy supposed to be able to do things like that, also... user admin is not intended to be used for regular activities like creating documents etc.... that is the task for regular users :) (according to their group/user policies)

Bole
on 12/10/14, 9:36 AM

I'll go to create a regular user... thanks!

José
on 12/10/14, 11:07 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: 12/10/14, 7:23 AM
Seen: 453 times
Last updated: 3/16/15, 8:10 AM