コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6693 ビュー

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
2852
1
4月 20
2249
0
2月 24
1512
0
12月 18
2909
1
2月 24
2674