Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6154 Lượt xem

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       

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
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 

}
});
Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 23
5616
0
thg 7 22
3335
0
thg 7 22
1896
3
thg 10 21
7715
2
thg 3 20
7680