Community 보관된 메일 그룹

community@mail.odoo.com

Avatar

Re: Javascript method overriding

작성자
andrew
- 2017년 06월 30일 03시 20분 18초
hi Dev Loper , i think there is function that use this._super() -> re check again what this._super() so it called twice

On Thu, Jun 29, 2017 at 9:40 PM, Dev Loper <odoo.com2017@gmail.com> wrote:
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!!

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


참조