Community Mailinglisten Archive

community@mail.odoo.com

Avatar

Javascript method overriding

durch
Dev Loper
- 29.06.2017 10:36:03
Hello,
I'm trying to override the load_list function from the view_list.js file, here is my code:
openerp.my_module_name = function(instance) {
instance.web.ListView.include({
load_list: function(data){
this._super(data)
var model = this.model
var context = this.options.action.context
if(model=="purchase.requisition"){
console.log(context['action'])
}
}
})
}

I noticed the console.log(context['action']) instruction is executed twice and I didn't get it. 
Does someone have an idea why this is happening?

Thanks in advance!!

Mahnungen