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

We are trying to hide the info button on the POS screen.

What I need is for the conditional in the following piece of (default) code to be an actual condition (that I will link to a parameter).


ProductScreen.addControlButton({
component: ProductInfoButton,
condition: () => true,
position: ['before', 'SetFiscalPositionButton'],
});
As this is part of the Odoo source code, I cannot alter the code itself.

Now as far as I understand, this piece of code simply adds a component to the Product Screen.

Can I either: 

  • prevent the default from firing and call it myself with a custom condition
  • alter the added button and change the condition of it

Any help would be kindly appreciated


Ảnh đại diện
Huỷ bỏ

hey I'm in the same page. So far I have tried https://www.cybrosys.com/blog/how-to-show-hide-a-button-in-odoo-15-pos-based-on-the-user but no luck 'cause it seems his proposal needs some context. How to extend or modify original condition?? Have you made any progress???

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 23
2330
1
thg 7 25
1721
1
thg 9 24
2405
3
thg 3 25
8205
0
thg 1 24
1675