Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7602 Lượt xem

hi all,

is there any way to control the visibility of some buttons to some certain groups without using the coding back end?

is there any apps can do that ?


thanks a lot

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

If the button in question is defined in a view (and not generic like the create/edit button in the nav bar), you can easily edit the XML for views in Odoo debug mode. However, I'm not sure if this will permanently solve your problem.

Steps:

  • enable debug mode

  • go to Settings -> Technical -> User Interface -> Views

  • Find the view where the button is located, e.g. search for all views for the model in question and review the views

  • If the <button> is found, you can add groups="<your_group>"

For a start, you might review the view product.template.common.form, and have a look at "Configure Variants" on the top with groups="product.group_product_variant". This button is only visible for users, that are allowed to administer product variants.



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

I haven't seen any app for  that in the store, if you don't want to do it as a custom module, you can try achieving the same from user interface, by adding a inherited view from views menu in settings.

See: https://www.youtube.com/watch?v=6bIgk4mtfQ4&list=PLqRRLx0cl0hoOYZzwtNH_0bqgF_ROGa8w&index=2

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 25
381
0
thg 1 25
1471
0
thg 1 25
1513
1
thg 12 24
2009
0
thg 5 24
1551