Help

0

How to tree/form view of users belonging to a particular group ?

Avatar
Ananth S K

Hi, I have created a menu for showing all the users belonging to a particular group called 'Caregiver'. But the problem is that currently it shows every user in res.users...I only need users belonging to the group 'Caregiver'. Here is my code:

XML for menu:

<menuitem id="main_menu_rescuee"
name="HelpMe"
web_icon="otl_rescuee,static/description/icon_helpme.png"
sequence="4" groups="otl_rescuee.group_caregiver_manager_user"/>
<menuitem
id="menu_rescuee"
name="Rescuee"
parent="main_menu_rescuee"
sequence="1"/>
<menuitem
id="menu_caregiver"
name="Caregiver"
action="action_otl_rescuee_caregiver"
parent="menu_rescuee"
sequence="1"/>


Action for Caregiver menu:


<record id="action_otl_rescuee_caregiver" model="ir.actions.act_window">
<field
name="name">Caregivers</field>
<field
name="res_model">res.users</field>
<field
name="view_mode">tree,form</field>
<field
name="context">{'groups_id': True}</field>
<field
name="help" type="html">
<p
class="oe_view_nocontent_create">
Create new Rescuee
</p>
</field>
</record>


Does anybody know how I can filter out users belonging to a particular group?
アバター
破棄