angular-odoo-jsonrpc
v2.0.12
Published
Odoo JsonRPC Service for Angular >=13
Downloads
15
Maintainers
Readme
Angular-Odoo-Jsonrpc
OdooRPC for Angular 13 or 14 with rxjs
Installation
npm install --save angular-odoo-jsonrpc
Functions list
login(db, user, pass)
logout(force)
getDbList()
searchRead(model, domain, fields, limit, offset, context)
call(model, method, args, kwargs)
How to use
Import OdooRPCService
into service or effect
import { OdooRPCService } from 'angular-odoo-jsonrpc';
Initialize configuration in constructor
of component
export class OdooClientExampleService {
constructor(
private odooRPC: OdooRPCService
){
this.odooRPC.init({
odoo_server: "https://odoo-server-example",
http_auth: "username:password" // optional
});
this.odooRPC.login('db_example', 'username', 'password')
.pipe(
tap(() => console.log('login success')),
catchError(err => console.error('login failed', err))
);
}
...
}