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

How to hide the info button on the POS screen? I tried to check  if there is any such function but couldnt get it!


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

Hi @engrdostmhd@gmail.com,

Please find code in comments. 

Please find below code it may help you to resolve this issue.

Thanks & Regards,Email: odoo@aktivsoftware.com Skype: kalpeshmaheshwari

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

Try below code:
create a xml file with below code in static/src/xml folder

file name = pos_templates.xml
--------------
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-name="ProductInfoButton" t-inherit="point_of_sale.ProductInfoButton"
t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('control-button')]" position="attributes">
<attribute name="style">
display: none;
</attribute>
</xpath>
</t>

</templates>
--------------

here 'point_of_sale.ProductInfoButton' is the original template which adds the info
button so you need to inherit it and add style to it if you only want to hide it
or you can replace it with empty xpath to completely remove it.

add the xml file in the menifest.py like below:
"assets": {
"web.assets_qweb": [
"ak_pos/static/src/xml/pos_templates.xml",
],
},
--------------

Câu trả lời hay nhất

Currently there is no way to hide. 

]Let's wait for V16. Or maybe you can try some 3rd party app that hide this button.

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