December 2018
Beginner to intermediate
404 pages
10h 14m
English
Our goal here was to learn to write the interface between an external application and the Odoo server, and this was done in the previous section. But it would be a shame not to go the extra step and actually make it available to the end user.
To keep the setup as simple as possible, we will use Python's built-in features to implement the command-line application. Since it is part of the standard library, it does not require any additional installation.
Now, alongside the library_api.py file, create a new library.py file. It will first import Python's command-line argument parser and then the LibraryAPI class, as shown in the following code:
from argparse import ArgumentParser from library_api import LibraryAPI ...
Read now
Unlock full access