Thanks for your answer.
I haven't been able to inherit the PosComponent.js file, but I did found an other way to solve my issue, but it's not quiet the solution to this question.
I found out that i can inherit / override functions in components that is in the Registries class like so:
const PaymentScreen = require('point_of_sale.PaymentScreen');
const Registries = require('point_of_sale.Registries');
const MyPaymentScreen = PaymentScreen =>
class extends PaymentScreen {
constructor (){
super(...arguments);
}
onClick() {
// your code here
console.log('button clicked)
}
};
Registries.Component.extend(PaymentScreen, MyPaymentScreen);
return MyPaymentScreen;
});
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="MyPaymentScreen" owl="1">
<div class="ticket-button" t-att-class="{ highlight: props.isTicketScreenShown }" t-on-click="onClick">
<!-- <div class="with-badge" t-att-badge="count"> -->
<i class="fa fa-credit-card" aria-hidden="true"></i>
<!-- </div> -->
</div>
</t>
<t t-inherit="point_of_sale.Chrome" t-inherit-mode="extension">
<xpath expr="//OrderManagementButton" position="before">
<MyPaymentScreen t-if="env.pos.config.use_proxy" />
</xpath>
</t>
</templates>