Skip to content

chermed/kodoo

Repository files navigation

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.

asciicast

Zen mode :

asciicast

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

  1. Install the command following the instructions
  2. Initialize the configuration using the command kodoo init-config
  3. Edit the configuration (only the list of servers is mandatory)
  4. Run the command kodoo
  5. Type ? to see the help page, and ESC to go back to the main page
  6. Start to query the data from a database

Features

  1. Switch between many Odoo servers
  2. Manage and run macros
  3. Query objects and automatic refresh
  4. Pagination support
  5. Quick access to related records
  6. Auto detection of fields to show as columns in the table
  7. Run remote function on a selected records
  8. Sort and filter records
  9. Show metadata and details of a record
  10. Change dynamically the database or the user to use
  11. Zen mode (focus on data with auto page rotation)
  12. 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 :

  1. Model: sale.order
  2. Fields: id, name, partner_id and state
  3. Domain: [["state", "in", ["sent","sale"]], ["partner_id.name", "ilike", "gem"]]
  4. Order: id asc, name desc
  5. 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

  1. For developers :
    1. Provide a fast way to see technical data (IDs and metadata) of records.
    2. Query and show invisible objects and invisible fields
  2. For Odoo customers :
    1. Use the Zen mode to display data on a hanging screen (Kitchen for a restaurant, Work orders for the manufacturing, etc)
    2. Use macros like menu actions (custom views)

Limitations :

  1. Data filtering is basic:
    1. The values in the domains are sent to odoo as strings or list of strings
    2. If many filters are provided, the logical operator that's applied is AND
  2. 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.