Odoo Session Expired RPC

1k views Asked by At

I'm using this library to connect to odoo-sh, I'm able to connect I get the proper user in the client object along with the sessionId, 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: '[email protected]',
        name: 'api employee',
        job_title: 'Robot job title',
        mobile_phone: '123456',
        active: true
      }]);
      console.log(response);
    } catch (error) {
      console.log(error);
    }
  }

Any help would be appreciated

0

There are 0 answers