User is also a kind of res_partners, so all sales person can see all the users in the system and even modify them under menu Sales/Customers.
This is not make sense.. .How to prevent from this??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
User is also a kind of res_partners, so all sales person can see all the users in the system and even modify them under menu Sales/Customers.
This is not make sense.. .How to prevent from this??
For such case my solution is as below:
Extended the existing window action, and add a domain to restrict the records.
<record id="base.action_partner_form" model="ir.actions.act_window">
<field name="domain">[('user_ids', '=', False)]</field>
</record>
For res.partner object you create/modify ir.rule with read access for selected sales group and with Rule Definition (Domain Filter) like this:
['|',('customer', '=', 1),('supplier', '=', 1)]
Internal user as kind res.partner is not a Customer and not a Supplier.
This solution is able to restrict records in res.partner view, but this could result in another problem....After enable this ir.rule, the user cannot see the other user's infomation in the other view, such as Sales/Sales Teams.
In this case you create new group/s and similar new ir.rule based on value of field section_id - corresponding to Sales Team.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up