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

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


아바타
취소

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???

관련 게시물 답글 화면 활동
1
8월 23
2317
1
7월 25
1698
1
9월 24
2394
3
3월 25
8161
0
1월 24
1649