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

Hi Odoo developers,

How can i add a new button in the top bar of the POS window, when click on that button i need to make a pop up.How can i achieve this in Odoo 13.And is there any tutorials for learning JavaScript frame work of Odoo 13?.

By PythonBrains

아바타
취소
베스트 답변

Hi,

You can add the button in the top bar of pos window by using following code.

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="OrderSelectorWidget">
<t t-jquery="div.order-selector" t-operation="append">
<div>
<span class="order-button square add-product">
<i class="fa fa-files-o"></i>
Add Product
</span>
</div>
</t>
</t>
</templates>

For popup window based on this you can write the JavaScript code in the onclick function of this button. For an example you can check the following odoo app Create Products From POS .​ 

JavaScript tutorials are rarely available, you can refer odoo official doc  Javascript Reference odoo 13 

Regards

아바타
취소
관련 게시물 답글 화면 활동
1
4월 20
2265
1
4월 20
1734
0
2월 24
1027
0
12월 18
2410
1
2월 24
1841