Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

how to read field values using js

By
Nehal
on 4/23/14, 6:32 AM 1,843 views

Hi,

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

0
Lithin T
On 7/3/14, 2:22 PM

        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);

});

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/23/14, 6:32 AM
Seen: 1843 times
Last updated: 5/4/16, 3:51 AM