+3 votes
9 views

I'm using this library to connect to odoo-sh, I'm able to connect and I get the proper user in the client object along with the session Id, but when I try to create a new record I get an error that the Odoo Session Expired, I'm wondering if I'm missing some parameter that I'm not sending,

this is the code:

const odoo = new Odoo({
  host: 'company-project-xxx.dev.odoo.com',
  port: 443,
  protocol: 'https'
});

const client = await odoo.connect({
    database: 'company-project-xxx',
    username: 'user',
    password: 'pass'      
  });
  if (client) {
    try {
      const response = await client.create('hr.employee', [{
        work_email: 'api@test.com',
        name: 'api employee',
        job_title: 'Robot job title',
        mobile_phone: '123456',
        active: true
      }]);
      console.log(response);
    } catch (error) {
      console.log(error);
    }
  }
in Server by (10k points) | 9 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
173 questions
150 answers
30 comments
16,831 users