I am currently struggling in POS on Odoo. I am new in modifying the front-end of Odoo using Javascript.
I already look at different module but I am confuse and I already searched it but I found the related problems and solutions in the older version of Odoo which is version 8 and 9.
All I want to do is to add the "Care of" button below the "Cash (USD)" button in the payment interface and add some functions.
but
it appears in left pane above the numpad pane.
using this line of codes.
pos_custom/static/src/js
pos_custom.js
odoo.define('pos_custom.pos_custom', function (require) {
"use strict";
var screens = require('point_of_sale.screens');
var careOfButton = screens.ActionButtonWidget.extend({
template: 'careOfButton',
button_click: function(){
var self = this;
this.gui.show_popup('selection',{
'title': 'Welcome to JS world',
});
},
});
screens.define_action_button({
'name': 'careOf',
'widget': careOfButton,
});
});
pos_custom/static/src/xml
pos_custom.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="careOfButton">
<div class='control-button'>
<i class='fa fa-tag' /> Care of
</div>
</t>
</templates>
Please help me. Any suggestions/ possible solutions. Thank you