تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
7 الردود
11658 أدوات العرض

How to give sale menu access for newly created user group

الصورة الرمزية
إهمال
أفضل إجابة

Hello Vinod,


You can give access rights for the menu in the ir.model.access.csv file


For Ex:-

access_sale_order_new_group,access.sale.order.new.group,model_sale_order,module_name.new_group_name,1,1,1,1


First 1 for read,

Second 1 for write, 

Third 1 for create,

Last 1 for delete.


UPDATE :-

<menuitem name="Sales"

id="base.menu_base_partner"

web_icon="sale,static/description/icon.png"

groups="module_name.group_name, base.group_sale_salesman,base.group_sale_manager" sequence="6"/>


Hope it works for you.

Thanks,

الصورة الرمزية
إهمال
الكاتب

Thank you for giving answer, I know how to give access to class/table but i am not able to give access to menu can you help me out

try to inherit sale menu and apply your custom new group.

الكاتب

I have written code like this but its not working

الكاتب
أفضل إجابة

better you can go with front-end. Goto settings -> security -> access control list -> make the access control list manually like this.before that you need to add the group with specific control.

الصورة الرمزية
إهمال
أفضل إجابة

Hi Vinod Kumar

W.r.t your query, I have gone through it and tried to replicate it. Few recommendations which I would like to suggest you which might cater to your needs are as follows:-

1) Yes its possible to assign Sales Menu access for newly created user group

2) For the newly created user group in order to assign access as per group,following can be done while creation of the new groups :-

i) Firstly under Access Rights in groups you just need to add the model name and assign the rights such as READ,WRITE,CREATE & DELETE. This can be done by following Settings >Users>Groups

Refer this screen shot for more details :- http://prntscr.com/a1qzfl

ii) One prerequisite is that the models needs to be defined/developed first so that the same can be assigned along with their access rights for the newly created user groups.

In case your issue is still not solved, kindly let me know.

Hope it helps

 Cheers!!

الصورة الرمزية
إهمال
الكاتب

Thank you for your answer, i know how to give access to object/model but when i am am not able to access the sales menu for newly created user group i have written code like this Here sales_team_lead is newly created group when i login with this group member i am not able to view opportunity menu

الكاتب

my code when i login with user bilongs to sale_team_lead group i am not able to access opportunities menu

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 23
2118
2
مايو 22
2143
0
مارس 15
3616
2
سبتمبر 24
1471
6
مارس 24
2796