我在POS odoo 11中的模板PaymentScreenWidget中创建了自定义按钮,我无法找到给它提供功能打印接收功能的方法。我该怎么办?
mymodule / static / src / xml / .... xml中的“我的按钮”
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-name="PaymentScreenWidget" t-extend="PaymentScreenWidget">
<t t-jquery='.payment-buttons' t-operation='append'>
<div class="control-button">
Custom Button
</div>
</t>
</t>
</templates>
我的js文件
odoo.define('POS.pos', function (require) {
'use strict';
var models = require('point_of_sale.models');
var core = require('web.core');
var Widget = require('web.Widget');
var screens = require('point_of_sale.screens');
var gui = require('point_of_sale.gui');
var qweb = core.qweb;
});
我的观点/ ... xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="demo_example_ext_js" name="Demo Example Ext Js" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script type="text/javascript" src="/POS/static/src/js/pos.js"></script>
</xpath>
</template>
</odoo>