Developer

RPC made even easier

1 min read

Quick summary

The article presents a simpler way to use RPC, making remote communication with applications related to OpenERP easier. Its focus is technical: reducing the complexity of integrations between applications.

Contents

The KDE client provides libraries that developers can use to create applications while relying on the OpenObject server for data storage and management. This article focuses on the RPC library.

XML-RPC is straightforward to use from Python, but Net-RPC offers better performance. Koo’s RPC library hides the underlying protocol and provides a simple interface, including asynchronous queries that keep the user interface responsive while requests run in the background.

The API was undergoing cleanup at the time, including renaming the old ktiny namespace to Koo (KDE OpenObject).

A synchronous example:

```python import Koo.Rpc session = Koo.Rpc.Session() session.login('http://admin:admin@localhost:8069', 'database')

Or: session.login('socket://admin:admin@localhost:8069', 'database')

session.call('/object', 'execute', 'res.partner', 'search', [('name', 'ilike', 'NaN')]) session.logout() ```

GUI applications can instead use asynchronous calls so that network operations do not block the interface.

Frequently asked questions

What is RPC in the context of the article?

It is the remote communication mechanism presented in the article as a simpler way to interact with the system.

What is the article mainly about?

It explains how to make RPC easier to use in applications related to OpenERP.

What benefit does the presented approach seek?

It aims to reduce the complexity of interacting with the system remotely and make integrations easier to develop.

Does the article address a user feature or a technical topic?

It mainly addresses a technical issue related to communication between applications.