Skip to content

ProjoMania/OdooDeveloperTools

Repository files navigation

Odoo Developer Tools

A collection of command-line utilities to simplify Odoo development and server management tasks.

Features

  • SSH Server Management

    • Add SSH server configurations
    • List all configured SSH servers
    • Connect to SSH servers with a simple menu
  • Odoo Database Management

    • List all local Odoo databases with details
    • Show database size, filestore size, and Odoo version
    • Drop databases and their filestores
    • Restore databases from backup files
    • Extend Odoo Enterprise license expiration dates
  • Interactive TUI Menu

    • Navigate all tools through a user-friendly interface
    • Organized categories for easier access
    • Dialog-based menu system

Installation

Automatic Installation

The easiest way to install is to use the provided installation script:

./install.sh

This script will:

  1. Check for required dependencies
  2. Create necessary directories
  3. Install the scripts to ~/bin/odoo-tools
  4. Create shell aliases for easy access
  5. Update your SSH configuration

Manual Installation

If you prefer to install manually:

  1. Create the necessary directories:

    mkdir -p ~/bin/odoo-tools
    mkdir -p ~/.ssh/config.d
  2. Copy the scripts to your bin directory:

    cp AddSSHServer ConnectSSHServer ListSSHServers ListOdooDatabases ~/bin/odoo-tools/
  3. Make the scripts executable:

    chmod +x ~/bin/odoo-tools/*
  4. Add the following to your ~/.bashrc or ~/.zshrc:

    alias addssh='~/bin/odoo-tools/AddSSHServer'
    alias connectssh='~/bin/odoo-tools/ConnectSSHServer'
    alias listssh='~/bin/odoo-tools/ListSSHServers'
    alias listodb='~/bin/odoo-tools/ListOdooDatabases'
  5. Update your SSH config to include the config.d directory:

    echo "Include ~/.ssh/config.d/*.conf" >> ~/.ssh/config

Usage

SSH Server Management

Add a new SSH server

AddSSHServer

Follow the prompts to add a new SSH server configuration.

List all SSH servers

ListSSHServers

Displays a table of all configured SSH servers with their details.

Connect to an SSH server

ConnectSSHServer

Shows a menu of available servers and connects to your selection.

Odoo Database Management

List all Odoo databases

ListOdooDatabases

Displays a table of all local Odoo databases with their name, owner, version, database size, and filestore size.

Drop an Odoo database

DropOdooDatabase

Shows a menu of available databases and allows you to select one to drop, including its filestore.

Restore an Odoo database

RestoreOdooDatabase

Restores an Odoo database from a backup file (.zip), with options to:

  • Deactivate cron jobs
  • Deactivate email servers
  • Reset admin credentials

Extend Odoo Enterprise license

ExtendOdooEnterprise

Finds all Odoo Enterprise databases and allows you to extend their license expiration date by 20 days.

Interactive TUI Menu

OdooDevTools

Provides a Text User Interface (TUI) menu system for accessing all tools in the collection. Features include:

  • Organized categories for SSH and Database management
  • Easy navigation with keyboard
  • Help and about information
  • Requires the dialog package (automatically installed if missing across various Linux distributions)

Screenshots

Interactive TUI Menu

OdooDevTools Main Menu

The main menu of the OdooDevTools

Database Management Menu

Database management options

SSH Server Management

SSH Servers List

List of configured SSH servers

Customization

You can customize the tools by editing the configuration variables at the top of each script:

  • SSH Configuration Directory: Default is ~/.ssh/config.d
  • Odoo Filestore Directory: Default is ~/.local/share/Odoo/filestore
  • PostgreSQL User: Default is postgres

Requirements

  • Bash shell
  • SSH client
  • PostgreSQL client (for database tools)
  • bc command (for size calculations)

License

This project is open source and available under the MIT License.

About

Odoo Developer Tools

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages