On the sale.order.line model, I have the field "tax_id", I need this field to readonly for a specific group, but I need to make it happen using odoo only without any code modifications. Is there any possibility for this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hi,
1. Create a New Group (if not already created):
If you haven't
already created a group for the specific users who should have read-only
access to the "tax_id" field, you can do so by following these steps:
Go to "Settings" > "Users & Companies" > "Groups."
Create a new group (e.g., "Tax Readonly Group").
In the "Access Rights" tab, give the necessary access to the group for the sale.order.line model.
2. Set Field Readonly Access for the Group:
After creating the group, you can set field-level access rights for the "tax_id" field to make it read-only for that group:
Go to "Settings" > "Technical" > "Database Structure" > "Fields."
Search for the "tax_id" field in the list and click on it to open its details.
In the "Access Rights" tab, set the "Readonly" access right to the group you created (e.g., "Tax Readonly Group").
3. Apply Field-Level Security:
Next, you need to apply field-level security to the model. Here's how to do it:
Go to "Settings" > "Technical" > "Security" > "Record Rules."
Create a new record rule.
Define
the domain and conditions for the rule. For example, if you want to
make the "tax_id" field read-only for specific records, you can define a
domain that matches those records.
In the "Technical Features" tab of the record rule, set "Fields: Write" to "false."
In the "Access Rights" tab, assign the rule to the group you created earlier (e.g., "Tax Readonly Group").
By
following these steps, you can make the "tax_id" field read only for a
specific group without any code modifications in Odoo. Users belonging
to that group will have read-only access to the field as defined in the
record rule and field-level access rights.
Hope it helps
In odoo 17. In the part of..
In the "Access Rights" tab, set the "Readonly" access right to the group you created (e.g., "Tax Readonly Group").
It did have the "Access Rights" tab, but i can't find the "ReadOnly" checkbox.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Sep 15
|
4263 | ||
|
3
Jan 24
|
13518 | ||
|
3
Dec 21
|
15725 | ||
|
23
Apr 23
|
48278 | ||
|
0
Feb 23
|
4502 |