Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I'm new to JS coding for Odoo. I'm getting this error message and I can't figure out what I've done wrong. Code is below. Don't know why my instance is undefined. Any ideas?


Error:

Uncaught TypeError: Cannot read property 'include' of undefined


Code:

openerp.context_views = function(instance){

instance.web.ViewManager.include({

switch_mode: function(){

var self = this;

var model = new instance.web.Model("context_views.context_views");

model.call("_get_context", {context: new instance.web.CompoundContext({'view_type': this.view_type})});

this._super();

},

});

};

Ảnh đại diện
Huỷ bỏ

Did you find any solution to this? I am having the same problem.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 24
2229
5
thg 1 22
11735
0
thg 8 16
4477
0
thg 3 15
4188
0
thg 7 25
2