Community mailing list archives

How to fetch only employee data using node api?

Abdul Qudoos Mehdi
- 06/22/2016 06:29:40
I am using Node-odoo api to fetching data from odoo in json format, but I have two issues in it.
my code is

// Connect to Odoo
odoo.connect(function (err) {
    if (err) {
        return console.log(err);
    var ids = []
        //////////////////////// total no. contacts for testing
    for (var i = 1; i <= 100000; i++) {
    var params = {
        fields: ['name', 'email']

    }; //params
    odoo.get('res.partner', params, function (err, partners) {
        if (err) {
            return console.log(err);
        obj = partners;

        jsonfile.writeFileSync(file, obj)

    }); //get

by using ''res.partner" I also get junk data, because I don't know the employee record ids, thats why I ended loop to 100000 only for testing,
How can I get employee ids and in which model.
I don't know odoo tecnically..
Abdul Qudoos Mehdi