Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1288 Переглядів

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 

Аватар
Відмінити
Найкраща відповідь

try adding 

return _super.apply(this, arguments);

in your method renderButtons. it will work

Аватар
Відмінити
Автор

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

Related Posts Відповіді Переглядів Дія
1
серп. 24
1216
2
лип. 24
1232
1
вер. 24
2208
3
трав. 24
3141
0
лип. 25
253