Skip to Content
Menú
This question has been flagged
1 Respondre
7704 Vistes

Hi,

I want to fetch the state of the active_id using java script. can anyone help how to achieve this?

Avatar
Descartar
Best Answer

        fetch: function(model, fields, domain, ctx){
            return new instance.web.Model(model).query(fields).filter(domain).context(ctx).all()
        },

Make use of the above fetch function you can fetch data.

Example:

self.fetch('res.users',['name','company_id'],[['id','=',this.session.uid]]).then(function(users){

console.log("This is the User",users);

});

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de nov. 24
4095
0
de maig 24
1475
1
d’abr. 24
1539
0
d’ag. 21
8629
0
de jul. 17
2479