Skip to Content
Menu
This question has been flagged
1 Reply
1353 Views

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
Discard
Best Answer

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
Discard