Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have created a tab using following code :
<xpath expr="/form/sheet/notebook/page[@string='Academic & Professional Details']" position="after">
<page string="Family Details" groups="base.group_user">
<group col="4" string="Family Details">
<field name="family_detail_ids" widget="one2many_list" colspan="4" nolabel="1">
<tree string="Family Details" editable="bottom">
<field name="relation" />
<field name="name" />
<field name="qualification" />
<field name="occupation" />
<field name="dob" on_change="calculate_age(dob)"/>
<field name="age" />
<field name="contact" />
groups="base.group_user" has been set.
As per group definition, I think this tab should be visible only to logged-in user so that he can view his information. Why logged-in user is able to see information of other users as well.??? Can anyone please explain or suggest me any solution??
Update : Because two employees belong to the same group so they can see the infomation. Can anyone please answer my flowing questions :
1) How employee can see his own one field say: blood_group but not of other employee.
2) I am having two tabs : Public Information and Family Details. Logged-in employee should see his information under both these tabs and when he checks other's profile only Public Information tab should be visible
*Condition is both employees belong to the same group
Hi ya, thanks for sending link, it was really tough to find out in Mail, for which question to answer back...
Well coming to your question, I agree with Piyush...
Q1: you want to hide a field "blood_group" for certain users and show to other users, but since both the users belonging to same group, you cannot achieve it...
Alternate solution: add a new group say "group_blood_details" on the column "blood_group", and then this group will be a Additional group for the user you want to give access ..
Q2: Is a interesting requirement, but i believe this you cant achieve neither using groups nor security rules..
Alternate solution: add a functional field [store is False] which evalutes and returns whether the user has to see it or not, say it returns True or False [boolean value].. then in xml for the tab [Family Details] using attrs set invisible property based on the functional field...
Hope this helps you...
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/13/14, 6:50 AM|
|Seen: 2674 times|
|Last updated: 3/16/15, 8:10 AM|