Overview
Terminal UI for Odoo
The kodoo
tool is a Terminal UI for Odoo that allows to navigate data, it's destined to developers and end users, it supports the odoo versions from 8.0 to 15.0.
Zen mode :
Installation :
Visit the last release page
The release page contains all compiled binaries of this tool
Via script for macOS and Linux
curl -sSL https://raw.githubusercontent.com/chermed/kodoo/main/install.sh | sh
Via Homebrew for macOS or LinuxBrew for Linux
brew tap chermed/kodoo
brew install chermed/kodoo/kodoo
Upgrade :
brew upgrade chermed/kodoo/kodoo
Via a GO install
go get -u github.com/chermed/kodoo
For Windows
Get the executable from the release page
Using docker
The image is docker.io/chermed/kodoo
docker run -it --rm -v $(pwd):/.kodoo --net host chermed/kodoo:latest init-config
Edit the generated file, then run:
docker run -it --rm -v $(pwd):/.kodoo --net host chermed/kodoo:latest
Get started
- Install the command following the instructions
- Initialize the configuration using the command
kodoo init-config
- Edit the configuration (only the list of servers is mandatory)
- Run the command
kodoo
- Type
?
to see the help page, and ESC
to go back to the main page
- Start to query the data from a database
Features
- Switch between many Odoo servers
- Manage and run macros
- Query objects and automatic refresh
- Pagination support
- Quick access to related records
- Auto detection of fields to show as columns in the table
- Run remote function on a selected records
- Sort and filter records
- Show metadata and details of a record
- Change dynamically the database or the user to use
- Zen mode (focus on data with auto page rotation)
- Readonly mode
Query and filter
Let's assume the following query:
sale.order +id -name partner_id state state=sent,sale partner_id.name~gem %10
It will be parsed to :
- Model:
sale.order
- Fields:
id
, name
, partner_id
and state
- Domain:
[["state", "in", ["sent","sale"]], ["partner_id.name", "ilike", "gem"]]
- Order:
id asc, name desc
- Limit:
10
Only the model is required for the query, the other parameters could be given during the filter, example :
/state=sale +id %3 state name date_order
The transformation of operators is done in that way :
Kodoo operator |
Odoo operator |
= |
in |
~ |
ilike |
>= |
>= |
<= |
<= |
> |
> |
< |
< |
!= |
!= |
Use cases
- For developers :
- Provide a fast way to see technical data (IDs and metadata) of records.
- Query and show invisible objects and invisible fields
- For Odoo customers :
- Use the Zen mode to display data on a hanging screen (Kitchen for a restaurant, Work orders for the manufacturing, etc)
- Use macros like menu actions (custom views)
Limitations :
- Data filtering is basic:
- The values in the domains are sent to odoo as strings or list of strings
- If many filters are provided, the logical operator that's applied is
AND
- Binary fields value will not be shown or downloaded
Thanks
Thanks to derailed for his awesome k9s tool, it gave me the idea to build this tool.