# svg-odoo

> Library to connect odoo

Latest version **1.2.0** (published 2023-02-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install svg-odoo
pnpm add svg-odoo
yarn add svg-odoo
bun add svg-odoo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-02-15 |
| First published | 2022-07-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Inndico SAS |
| Maintainers | fuf-hernef |
| Keywords | odoo, library, axios |

## Links

- npm: https://www.npmjs.com/package/svg-odoo
- npm.io page: https://npm.io/package/svg-odoo

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [husky](https://npm.io/package/husky.md) ^8.0.0
- [moment](https://npm.io/package/moment.md) ^2.29.4

## Recent versions

- 1.2.0 (latest) — 2023-02-15
- 1.1.6 — 2022-12-22
- 1.1.5 — 2022-09-14
- 1.1.4 — 2022-09-06
- 1.1.3 — 2022-08-04
- 1.1.2 — 2022-07-18
- 1.1.1 — 2022-07-18
- 1.1.0 — 2022-07-14
- 1.0.9 — 2022-07-14
- 1.0.8 — 2022-07-08
- 1.0.7 — 2022-07-06
- 1.0.6 — 2022-07-06
- 1.0.5 — 2022-07-06
- 1.0.4 — 2022-07-06
- 1.0.3 — 2022-07-05
- … 2 more at https://npm.io/package/svg-odoo/versions

## README

# SVG-ODOO
Libreria para simplificar la conexión con odoo sobre JSONRPC.

## USO
```ts
import { SvgOdoo } from 'svg-odoo';

const connection = SvgOdoo.getIntance({
  username: 'Administrador',
  password: 'administrador',
  port: 8069,
  host: 'http://localhost',
  baseUrl: 'jsonrpc',
  version: '2.0',
  database: 'test'
});
 connection.login()
```

### Get all items
```ts
console.log(await connection.request({
      action: MethodsTypes.GET,
      model: 'hr.employee',
      columns: ['name', 'job_title', 'type_employee']
    }));
```

### Get single item
```ts
    // Get single Item
    console.log(await connection.request({
      action: MethodsTypes.GET,
      model: 'res.country',
      columns: ['name', 'code'],
      id: 259
    }));
```

### Create new item
```ts
    // Create New Item
    console.log(await connection.request({
      action: MethodsTypes.POST,
      model: 'res.country',
      payload: {
        name: 'OTRO PAIS',
        code: 'ZZZ'
      }
    }));
```

### Update single item
```ts
    // Actualizar Item
    console.log(await connection.request({
      action: MethodsTypes.PUT,
      model: 'res.country',
      id: 259,
      payload: {
        name: 'UN PAIS MAS',
        code: 'XX'
      }
    }));
```

### Delete single item
```ts
    // Eliminar Item
    console.log(await connection.request({
      action: MethodsTypes.DELETE,
      model: 'res.country',
      id: 259
    }));
```

### Emit Action
```ts
```

---
_Source: https://npm.io/package/svg-odoo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
