콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
9 답글
24076 화면

I need to assign the the menu's based on user groups ,how can i achieve this??

아바타
취소
베스트 답변

HI,

<menuitem action="ACTION_ID" id="NEW_MENU_ID" parent="PARENT_MENU_ID" groups="module_name.GROUP_XML_ID"/>

Bye.

아바타
취소
베스트 답변

You also need to add your module to the group

Example my module uses Inventory / Manager - <menuitem> calls up   groups="stock.group_stock_manager"

So in Settings>User>Groups I searched for "Inventory" and selected "Inventory / Manager"

Click on "Access Rights" click "edit" and then "Add an Item"

Add your module and give it a name.

.....Or better still see Niyas's answer here

아바타
취소
베스트 답변

Do you want to assign groups to menu ? If it is, you need to use 'groups' attribute like this:

<menuitem action="ACTION_ID" id="NEW_MENU_ID" 
           parent="PARENT_MENU_ID" groups="GROUP_XML_ID"/>

After making this change in xml file, Update your module and check it.

Thanks, Priyesh Solanki

아바타
취소
작성자

Thanks for your reply, i have followed the same way and its not working

Did you update your module with -u MODULE_NAME -d DB_NAME while restarting OpenERP server ?

작성자

Ya i have updated but still not working

Did you add that xml file in __openerp__.py ? Can you check from here: Settings --> Technical --> User Interface --> Menu Items and Search for you menu and open it. In Groups tab, can you that group is coming there that you set in groups attribute ?

작성자

for that menu item i am not able to see group , where exactly i am going wrong?

It looks like your view is not going to be update, I am assuming that everything is correctly done. Though can you try it in new database ?

관련 게시물 답글 화면 활동
2
5월 24
2324
3
4월 23
11796
1
4월 23
14807
1
5월 20
6559
1
5월 19
3006