Skip to Content
Menu
This question has been flagged
4 Replies
2820 Views

Hi...


i'm using Odoo Studio 17 , and make form for Jobs Report. For now, if i click save (icon cloud save), the form is still can edit by every user.

how to make it readonly for other user and only me can edit it ?


or 


how to make all fields in the form to be readonly after it save and how to make an EDIT & SAVE button for change it.


Thank you

Avatar
Discard
Author Best Answer

Thank you for all answer but i'm sorry i can mention or reply becuase new user in this forum.

The poin is i must create new user GROUP :

1. make access right full permission 

2. creat record rules for set other user only read my record and can not edit.


i'm still dont understand about domain while i create new record rules for point no. 2 above. i try using here :

Record Rules Name : Jobs Report Team

domain : [(1, '=', 1)] and accest right is checkils only in READ

the result is other user can see my record ✅ but they still can edit. ❌


i try others :


Record Rules Name : Jobs Report Team

domain : [('create_uid', '=', user.id)] and accest right is checkils only in READ

the result is other user can not see my record. ❌


please advice me for make all user can view all records but only owner record can edit it.

Avatar
Discard

[('create_uid', '=', user.id)] after applying the domain it is expected for the user to see only his records

Best Answer

Hi,
its good to implement the record rules for you model. You can design as follows by expecting there is two levels of users permission, lets say User in Jobs Report and Administrator in Jobs report.

* So create two user groups, which can be done from groups menu
* Add record rules for the both the groups for the model
* For user grand only permission to see his own records
* Administrator of the group can see all the record

Inside the rule, adjust the domain so that user will see his created records and admin will see all

Thanks

Avatar
Discard
Best Answer

Hi

You can make your form uneditable once the form is created by changing the view properties in Studio.

Steps:

  1. Get into the form and click the Studio icon.
  2. Click the View tab in the top left corner of the Studio screen and uncheck the Can Edit option.


This will make the form uneditable for all users once the form is created.

If you want to make the form read-only for other users but editable by the owner, then change the user access for that module to "User: Own Documents Only" in Settings -> Users -> [the user you want to restrict].


Thanks.



Avatar
Discard
Best Answer

Hi,

To make a form readonly for other users and editable only for you in Odoo Studio 17, you'll need to implement access rights and record rules. For that, you need to create a new user group.Then, modify the model's access rights to give full permissions to this group. Create a record rule that allows only the creator to edit the records. Adjust other users' access rights to read-only. Finally, update your form view in Odoo Studio to include a domain filter that shows only records created by the current user. This approach ensures that you alone can edit the form while others can view it but not make changes.

Hope it helps.

Avatar
Discard
Related Posts Replies Views Activity
2
Mar 15
11526
0
Jul 24
1062
4
Jan 23
17075
5
Feb 16
8678
2
Mar 15
3534