跳至内容
菜单
此问题已终结
1 回复
2594 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
0
6月 22
1906
1
7月 19
6918
1
7月 19
3922
2
12月 23
14903
0
10月 23
33