This question has been flagged

Hello All 

how are you doing ?

how to inherit payment button on pos screen?

what i need to do is when i click on payment under specific condition will go direct to receipt screen because i have been select the payment from that condition.


FYI:

operating system: Ubuntu 16

Odoo V: 10

Is enterprise: no



best regards       

Avatar
Discard
Best Answer
To inherit payment button you have to inherit ActionpadWidget. You can do it like below:

var pos_screen = require('point_of_sale.screens');

pos_screen.ActionpadWidget.include({ 

init: function(parent, options) {
var self = this;
this._super(parent, options);

       //YOURE CODE HERE 

},
renderElement: function() {
var self = this;
this._super();

        //YOURE CODE HERE 

}
});
Avatar
Discard
Author

Thanks bro

another Q

if i need :

*******************

pos_screen.ActionpadWidget.include({

init: function(parent, options) {

var self = this;

this._super(parent, options);

//YOURE CODE HERE

},

renderElement: function() {

var self = this;

this._super();

//HERE I NEED TO SET PAYMENT METHOD AND SHOW RECEIPT SCREEN

}

});

****************************

For that you can create a custom receipt screen and call it based on some conditions in renderElement function.