I need to put one button un payment section in POS that clear order line, but the button that i've created actually is in product screen, i tried this:
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="ClearCartLine">
<div class='control-button'>
Boton prueba
</div>
</t>
</templates>
and the js is this:
odoo.define('clear_button_fun.pos_view',function(require){ "use strict";
var screens = require('point_of_sale.screens');
var gui = require('point_of_sale.gui');
var core = require('web.core');
var ClearCartLine = screens.ActionButtonWidget.extend({
template: "ClearCartLine",
button_click: function(){
var self = this;
this.clear_button_fun();
},
clear_button_fun(){
var order = this.pos.get_order();
order.remove_orderline(order.get_selected_orderline())
},
});
screens.define_action_button({'name': 'clear_button_fun','widget': ClearCartLine,});
});
i need the button in position like that: