All Projects → tinyerp → odooly

tinyerp / odooly

Licence: other
Python library and CLI to interact with Odoo and OpenERP.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to odooly

odoo-docker-tutorial
利用 docker 快速建立 odoo 環境
Stars: ✭ 46 (-13.21%)
Mutual labels:  odoo, odoo13
odoo-helper-scripts
The easiest way to install and manage development odoo instances / projects.
Stars: ✭ 34 (-35.85%)
Mutual labels:  openerp, odoo
xmlrpcwsc-dotnet
XML-RPC Web Service Client C# implementation
Stars: ✭ 30 (-43.4%)
Mutual labels:  json-rpc, xml-rpc
odoo-development-environment-tutorial
建立 odoo 開發環境 ( source code )
Stars: ✭ 25 (-52.83%)
Mutual labels:  odoo, odoo13
odoo-demo-addons-tutorial
學習 odoo , 本文章會持續更新
Stars: ✭ 52 (-1.89%)
Mutual labels:  odoo, odoo12
vim-openerp
No description or website provided.
Stars: ✭ 15 (-71.7%)
Mutual labels:  openerp, odoo
odoobooks
Odoo Best Practices - Online Book
Stars: ✭ 46 (-13.21%)
Mutual labels:  openerp, odoo
Mjson
C/C++ JSON parser, emitter, JSON-RPC engine for embedded systems
Stars: ✭ 136 (+156.6%)
Mutual labels:  json-rpc
Aria2p
Command-line tool and library to interact with an aria2c daemon process with JSON-RPC.
Stars: ✭ 201 (+279.25%)
Mutual labels:  json-rpc
Jrpc
JSON-RPC implementation in C++17
Stars: ✭ 113 (+113.21%)
Mutual labels:  json-rpc
Remote Function
Make function calls to remote hosts seamlessly
Stars: ✭ 95 (+79.25%)
Mutual labels:  json-rpc
Brayns
Visualizer for large-scale and interactive ray-tracing of neurons
Stars: ✭ 232 (+337.74%)
Mutual labels:  json-rpc
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (+254.72%)
Mutual labels:  json-rpc
Jsonrpc
The jsonrpc package helps implement of JSON-RPC 2.0
Stars: ✭ 143 (+169.81%)
Mutual labels:  json-rpc
Ethereumex
Elixir JSON-RPC client for the Ethereum blockchain
Stars: ✭ 225 (+324.53%)
Mutual labels:  json-rpc
Jsonrpcserver
Process JSON-RPC requests in Python
Stars: ✭ 126 (+137.74%)
Mutual labels:  json-rpc
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+347.17%)
Mutual labels:  json-rpc
Myetherapi
An API by MyEtherWallet. ETH / Ropsten / JSON RPC / Web3
Stars: ✭ 95 (+79.25%)
Mutual labels:  json-rpc
Jsonrpc
A simple go implementation of json rpc 2.0 client over http
Stars: ✭ 170 (+220.75%)
Mutual labels:  json-rpc
Php Bitcoinrpc
Fully unit-tested Bitcoin JSON-RPC client based on GuzzleHttp.
Stars: ✭ 231 (+335.85%)
Mutual labels:  json-rpc

Odooly, a versatile tool for browsing Odoo / OpenERP data

Download and install the latest release:

pip install -U odooly

Documentation and tutorial: http://odooly.readthedocs.org

CI tests: https://app.travis-ci.com/github/tinyerp/odooly

Overview

Odooly carries three completing uses:

  1. with command line arguments
  2. as an interactive shell
  3. as a client library

Key features:

  • provides an API very close to the Odoo API, through JSON-RPC and XML-RPC
  • compatible with OpenERP 6.1 through Odoo 15.0
  • single executable odooly.py, no external dependency
  • helpers for search, for data model introspection, etc...
  • simplified syntax for search domain and fields
  • full API accessible on the Client.env environment
  • the module can be imported and used as a library: from odooly import Client
  • supports Python 3.5 and above, and Python 2.7

Command line arguments

There are few arguments to query Odoo models from the command line. Although it is quite limited:

$ odooly --help

Usage: odooly.py [options] [search_term_or_id [search_term_or_id ...]]

Inspect data on Odoo objects.  Use interactively or query a model (-m) and
pass search terms or ids as positional parameters after the options.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -l, --list            list sections of the configuration
  --env=ENV             read connection settings from the given section
  -c CONFIG, --config=CONFIG
                        specify alternate config file (default: 'odooly.ini')
  --server=SERVER       full URL of the server (default:
                        http://localhost:8069/xmlrpc)
  -d DB, --db=DB        database
  -u USER, --user=USER  username
  -p PASSWORD, --password=PASSWORD
                        password, or it will be requested on login
  -m MODEL, --model=MODEL
                        the type of object to find
  -f FIELDS, --fields=FIELDS
                        restrict the output to certain fields (multiple
                        allowed)
  -i, --interact        use interactively; default when no model is queried
  -v, --verbose         verbose
$ #

Example:

$ odooly -d demo -m res.partner -f name -f lang 1
"name","lang"
"Your Company","en_US"
$ odooly -d demo -m res.groups -f full_name 'id > 0'
"full_name"
"Administration / Access Rights"
"Administration / Configuration"
"Human Resources / Employee"
"Usability / Multi Companies"
"Usability / Extended View"
"Usability / Technical Features"
"Sales Management / User"
"Sales Management / Manager"
"Partner Manager"

Interactive use

Edit odooly.ini and declare the environment(s):

[DEFAULT]
scheme = http
host = localhost
port = 8069
database = odoo
username = admin

[demo]
username = demo
password = demo
protocol = xmlrpc

[demo_jsonrpc]
username = demo
password = demo
protocol = jsonrpc

[local]
scheme = local
options = -c /path/to/odoo-server.conf --without-demo all

Connect to the Odoo server:

odooly --list
odooly --env demo

This is a sample session:

>>> env['res.users']
<Model 'res.users'>
>>> env['res.users'].search_count()
4
>>> crons = env['ir.cron'].with_context(active_test=False).search([])
>>> crons.read('active name')
[{'active': True, 'id': 5, 'name': 'Calendar: Event Reminder'},
 {'active': False, 'id': 4, 'name': 'Mail: Fetchmail Service'}]
>>> #
>>> env.modules('delivery')
{'uninstalled': ['delivery', 'website_sale_delivery']}
>>> env.upgrade('base')
1 module(s) selected
42 module(s) to process:
  to upgrade    account
  to upgrade    account_chart
  to upgrade    account_tax_include
  to upgrade    base
  ...
>>> #

Note

Use the --verbose switch to see what happens behind the scene. Lines are truncated at 79 chars. Use -vv or -vvv to print more.

Note

To preserve the history of commands when closing the session, first create an empty file in your home directory: touch ~/.odooly_history

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].