Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1613 Vistas

Hello. Odoo 12.  I have custom module 'mymodule'. And I try add JS IN this module :

console.log('1')
odoo.mymodule = function(instance, local) {
console.log('2');
var ListView = instance.web.ListView;
ListView.include({
render_buttons: function () {
console.log('3');
}
});
}

 

This code work fine in Odoo 10 ( change odoo to openerp ).

I only see number 1 in the console.

What am I doing wrong? why the code doesn't work further



Avatar
Descartar
Mejor respuesta

Hello Mikhail
Please try like this, I think it's helpful for you

console.log('1')
odoo.define('mymodule', function (require) {
console.log('2');
var ListView = require('web.ListView');

    ListView.include({
        render_buttons:function () {
            console.log('3');
        }
    });
}


Avatar
Descartar