Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoniofregoso/bj-odoo
json-rpc connection for odoo
https://github.com/antoniofregoso/bj-odoo
Last synced: 13 days ago
JSON representation
json-rpc connection for odoo
- Host: GitHub
- URL: https://github.com/antoniofregoso/bj-odoo
- Owner: antoniofregoso
- License: gpl-3.0
- Created: 2023-08-02T19:33:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-07T15:06:29.000Z (5 months ago)
- Last Synced: 2024-11-08T05:42:08.395Z (about 2 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bj-odoo
json-rpc connection for odoo
## Sponsors
[](https://www.conference.com.mx/comercializacion-digital)## Methods
1. odoo.login()
2. odoo.count(object, ...args)
3. odoo.create(object, ...args)
4. odoo.search(object, ...args)
5. odoo.searchRead(object, ...args)
6. odoo.read(object, ...args)
7. odoo.update(object, ...args)
8. odoo.delete(object, ...args)## Installation
```
npm i @buyerjourney/bj-odoo
```
## Configuration
```json
{
"odoo":{
"host":"http://url",
"db":"odooDB",
"port":8069,
"username":"user",
"password":"apiKey",
"endpoint":"/jsonrpc"
}
}
```
## Usage
```javascript
import { OdooClient } from "@buyerjourney/bj-odoo";
import config from '/.env/conf.json' assert { type: 'json' };async function createLead(props={}){
try {
let odoo = new OdooClient(config.odoo)
let uid = await odoo.login();
crmLead = {
name:props.subject,
contact_name:props.name,
function: props.function,
partner_name:props.company,
email_from:props.email,
phone:props.phone,
description:props.description
}
let lead = await odoo.create('crm.lead',crmLead);
}catch (error){
console.error('Error:', error);
}
}
```## Documentation
- [BuyerJourneyJS project](https://buyerjourney.ninja/).
- [bj-components](https://buyerjourney.ninja/odoo).
- [Get started](https://buyerjourney.ninja/get-started).
## License
bj-odoo is [GPL-3.0-or-later](./LICENSE).