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

How to prevent from modifying user infomation under Customers menu

By
jianxin
on 11/4/15, 1:16 AM 429 views

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??

0
jianxin
On 11/10/15, 10:51 PM

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>

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 11/4/15, 6:19 AM

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.

jianxin
on 11/4/15, 7:58 PM

In this case you create new group/s and similar new ir.rule based on value of field section_id - corresponding to Sales Team.

zbik
on 11/6/15, 7:55 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: 11/4/15, 1:16 AM
Seen: 429 times
Last updated: 11/10/15, 10:51 PM