Skip to Content
Menu
This question has been flagged
1 Reply
5599 Views

I want to add a new view and menu item to an existing user group.

How can I make that with a new module ? 

I have an security/security.xml file already there...


Thank you


Avatar
Discard
Best Answer

Hi,

If you are looking for making the view and menu item visible for users in a user group, then you have to do like this.

Suppose the menu items id is test_menu_item and the model of the corresponding view be the test.model .


Then to view the menu item for the user group, then define the menu like this,

<menuitem action="menu_action" id="test_menu_item" groups="new_user_group" sequence="1"/>


Then we have to give the access right for the model, for that we have to write csv in  Security -> ir.model.access.csv ,

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
view_test_model,view.test_model,model_test_model,new_user_group,1,1,1,1

Set the permission for read, create, write and unlink accordingly .

Thanks

Avatar
Discard
Author

I mean How can I add a modifiy in this?:

<record id="group_customer_supplier_manager" model="res.groups">

<field name="name">test</field>

<field name="category_id" ref="base.module_category_extra" />

</record>

Author

ah modifiy like something like this:

attrs="{'invisible':[('1','!=','1')]}"

If you want to modify the above record you can copy the record into your custom module and rename the id of the record as original_module_name.original_id_of_record, then you can make necessary changes inside the record

Related Posts Replies Views Activity
1
May 22
14214
2
Sep 22
2428
0
Dec 19
3542
2
Dec 19
1647
5
Jun 19
11015