0

I have created an page/tab using following code :

<xpath expr="/form/sheet/notebook/page[@string='Academic &amp; 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" />                                                                                              
                 </tree>                                                        
             </field>
         </group>                                                                                     
     </page>                                        
</xpath>

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 this tab information of other users as well? Can anyone please explain or suggest a solution?

halfer
  • 19,824
  • 17
  • 99
  • 186
shivshankar
  • 691
  • 2
  • 14
  • 31

1 Answers1

1

You given access right to the User which has Human Resources = Employee.( Under Setting => Users => Users => Access Rights)

If You leaves empty Human Resources than this group will work groups="base.group_user" or hide page.

If you want to test a new group than you can check below thing:

<page string="Family Details" groups="base.group_sale_salesman_all_leads">

</page>

This page will see only if User has right for Sales => See all leads otherwise it will hide the page.

Hope this will help you.

Bhavesh Odedra
  • 10,990
  • 12
  • 33
  • 58
  • Thanks for quick response. But i want the user to see his own information under this page and for other employees this tab itself should not appear. – shivshankar Oct 14 '14 at 10:07
  • Let me explain little more. I am having 4 tabs - Public information, Personal Information, Family Details and HR Settings. Public Information should be visible to all - working(as i didn't set any group). Personal Information and HR Setting should be visible only to HR-Officer and HR-Manager - Working(groups="base.group_hr_user"). Family Details : Want to be visible only to logged-in user, HR-Office and HR-Manager. If another user is logged-in he should be able to see only public information not Family Details. I tried with groups="base.group_user" but not working – shivshankar Oct 14 '14 at 10:09
  • You can add one more group in Human Resources name like `User` And than you can handle easily. If the Human Resources is user than hide page and if not than it will visible. – Bhavesh Odedra Oct 14 '14 at 10:11
  • for default right of Human Resources group is Employee. It will not work. – Bhavesh Odedra Oct 14 '14 at 10:19