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

I'm looking for a way to override this method.


https://github.com/odoo/odoo/blob/1bdd0cc247d36c869ffdee7d501cb65d36be47a6/addons/payment_stripe_sca/static/src/js/payment_form.js#L32


I tried to do this


start() {

            PaymentForm.prototype._createStripeToken = function (ev, $checkedRadio, addPmEvent) {

            console.log("new call on start")

...


But it's not working

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Try the below code

odoo.define('stripe_token.payment_form', function (require) {
"use strict"; var Payment = require('payment.payment_form'); Payment.include({
_createStripeToken: function (ev, $checkedRadio, addPmEvent) {
var self = this;
return this._super.apply(this, arguments);
},
});
});

Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 22
1954
1
thg 7 19
6964
1
thg 7 19
3946
2
thg 12 23
15008
0
thg 10 23
33