İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1396 Görünümler

I make inherit from XML view it's name 

stock_move_line_product_selector

and I make override the confirm button with new button and I add class name select_pro_btn 

and I try this code with JS to make a special code for this button 

 

odoo.define('my_module.custom_save_button', function (require) {
"use strict";

var BasicController = require('web.BasicController');
var FormController = require('web.FormController');
var core = require('web.core');

FormController.include({
renderButtons: function ($node) {
this.$buttons.on('click', '.select_pro_btn', this._onSave.bind(this));
},
_onSave: function () {
console.log('_onSave');
},
});
});


but it not working 
can any one help me 

Avatar
Vazgeç
En İyi Yanıt

try adding 

return _super.apply(this, arguments);

in your method renderButtons. it will work

Avatar
Vazgeç
Üretici

still not working, I can't find the _onSave message in the console log

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ağu 24
1321
2
Tem 24
1304
1
Eyl 24
2341
3
May 24
3307
0
Tem 25
265