Hi all,
Here i want return all partners in odoo to stock picking by JavaScript.
get_partners: function(){
var self = this;
var model = new instance.web.Model('res.partner');
this.partners = [];
return model.query(['id', 'name']).filter([['customer', '=', 'True']]).limit(1000).all().then(function(partners){
_.each(partners, function(partner){
self.partners.push(partner);
});
});
},
This code perfectly fetching all partners, but doesn't return the arrays. please give me suggestions.
thanks in advance...