콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1618 화면

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



아바타
취소
베스트 답변

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');
        }
    });
}


아바타
취소