Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1302 Vizualizări

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 

Imagine profil
Abandonează
Cel mai bun răspuns

try adding 

return _super.apply(this, arguments);

in your method renderButtons. it will work

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
1
aug. 24
1236
2
iul. 24
1244
1
sept. 24
2238
3
mai 24
3167
1
iul. 25
4816