Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@metadonors/odoo-jsonrpc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metadonors/odoo-jsonrpc

Odoo JSONRPC Client

latest
npmnpm
Version
0.5.1
Version published
Maintainers
1
Created
Source

Odoo JsonRPC

Odoo JSON RPC client for browser and Node.js with support for Promises

Usage

Initialize odoo client

const odoo = new OdooRPC({
    host: 'http://localhost',
    database: 'demo_enterprise',
    username: 'admin',
    password: 'admin',
})

Browse

Fetch object by id (multiple or single id)

const partner_ids = await odoo.env('res.partner').browse(1)

or

const partner_ids = await odoo.env('res.partner').browse([1,2,3])

Create

const id = await odoo.env('res.partner').create({
    name: 'Test',
    email: 'test@example.com'
})

Write

await odoo.env('res.partner').write(1, {
    name: 'Test',
    email: 'test@example.com'
})

or

await odoo.env('res.partner').write([1, 2, 3], {
    name: 'Test',
    email: 'test@example.com'
})
const partner_ids = await odoo.env('res.partner').search([
    ['name', '=', 'Test']
])

Search Read

const partner_ids = await odoo.env('res.partner').search_read([
    ['name', '=', 'Test']
], ['name', 'email'])

Search Count

const total = await odoo.env('res.partner').search_count([
    ['name', '=', 'Test']
])

Keywords

odoo

FAQs

Package last updated on 17 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts