Flask-Odoo is an extension for Flask that aims to simplify the integration with the Odoo XML-RPC API
Project description
Flask-Odoo
Flask-Odoo is an extension for Flask that aims to simplify the integration with the Odoo XML-RPC External API.
Installing
Install and update using pip:
$ pip install -U Flask-Odoo
Example
Initialize the Flask extension:
from flask import Flask
from flask_odoo import Odoo
app = Flask(__name__)
app.config["ODOO_URL"] = "http://localhost:8069"
app.config["ODOO_DB"] = "odoo"
app.config["ODOO_USERNAME"] = "admin"
app.config["ODOO_PASSWORD"] = "admin"
odoo = Odoo(app)
then fetch the Odoo version information by:
>>> odoo.common.version()
{
"server_version": "13.0",
"server_version_info": [13, 0, 0, "final", 0],
"server_serie": "13.0",
"protocol_version": 1,
}
or call a method on an Odoo model:
>>> odoo["res.partner"].check_access_rights("read", raise_exception=False)
true
Contributing
Setup your development environment by running:
$ make
this will create a new Python virtualenv, install all necessary dependencies and run the tests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Odoo-0.0.2.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Odoo-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d657be3e061ccc42e446ac073b20aa2b8a43306b9442d5d95203e9dba6e10b7 |
|
MD5 | 00fa892e0a8323216d57eb62ea608072 |
|
BLAKE2b-256 | 691b229ef8797bafda619b0e572cefd7ee7e5ab4fa9dd85112be6755c3e05e7e |