2024-09-11 16:00:51 +02:00
2024-07-29 12:44:04 +02:00
2024-09-04 12:21:05 +02:00
2024-08-27 09:44:40 +02:00
2024-09-02 16:02:52 +02:00
2024-09-04 12:21:05 +02:00
2024-04-18 17:07:03 +02:00
2024-09-04 12:21:05 +02:00
2024-09-04 12:21:05 +02:00
2024-07-31 09:57:25 +02:00
2024-09-11 16:00:51 +02:00
2024-09-04 12:21:05 +02:00
2024-07-22 11:52:11 +02:00
2024-05-24 15:05:43 +02:00
2023-11-14 17:36:04 +01:00
2024-07-11 08:47:46 +02:00
2024-08-22 13:50:51 +02:00
2024-04-25 16:37:15 +02:00
2020-08-17 09:21:11 +02:00
2021-11-08 21:39:04 +01:00
2024-09-02 16:16:48 +02:00
2024-07-22 11:52:11 +02:00
2024-07-22 14:18:35 +02:00
2024-07-31 09:59:18 +02:00
2024-04-18 17:07:03 +02:00
2024-07-22 11:52:11 +02:00
2024-09-04 12:21:05 +02:00
2024-09-03 11:52:49 +02:00

Odoo Build

Docker pulls

This is the Mint System Odoo development environment.

This projects provides a highly opinionated way to develop Odoo modules. It features:

  • Odoo Source: Checkout the Odoo Community and Enterprise Edition and start editing the source code.
  • Docker Compose: Spin up a Odoo, Postgres and pgAdmin Docker container and experiment locally.
  • Native: Start an Odoo server directly from the source.
  • Import and Export Database: Use Odoo scripts to copy and restore a customer database to the local environment. Investigate issues and deploy the database at ease.
  • Community Modules: The most common community modules are checked out when setting up the project.
  • Customizing Snippets: Create snippets and push them to an Odoo database.
  • Odoo Scripts: Develope scripts to patch Odoo code.
  • Odoo Revisions: Snapshot the Odoo source at a specific date. See revisions for details.
  • Odoo Image: Build and publish a custom Odoo Docker image. See README for details.
  • Kubernetes: Deploy Odoo and Postgres to a Kubernetes cluster.
  • Develop Modules: Scaffold a new module, develop new Odoo features locally and much more.
  • Credentials: Setup credentials to log into Odoo.
  • Import Data: Import Odoo records from CSV.

Requirements

The Odoo development environment has the following requirements:

You can also use Nix to setup the development requirements.

Usage

The usage section is a set of workflows. See task help or task for details about the project commands.

Clone this repository.

git clone git@github.com:Mint-System/Odoo-Build.git
cd Odoo-Build

When working with Nix, run the nix-shell.

nix-shell

Checkout the Odoo version.

task checkout 13.0
# or
task checkout 14.0
# or
task checkout 15.0
# or
task checkout 16.0
# or
task checkout 17.0

Install Odoo scripts.

task install-odoo-scripts

Native

Run Odoo from source. Currently supported OS: Ubuntu, Debian, Pop!_OS, Darwin

Install Odoo native requirements

Pull the odoo submodule and install the python dependencies.

git submodule update odoo
task install-native

Initialize and start Odoo from source

Run database container only.

task start db

Initialize database.

task init-db

Start Odoo from source.

task start native

The browser will be opened automatically.

Create a new module from source

Scaffold a new module.

task create-module addons/project_report

Load modules from thirdparty folder

Clone thirdparty repos into the thirdparty folder.

To load modules from a thirdparty folder, set this env var in your .env file.

ODOO_ADDONS_PATH=thirdparty/odoo-apps-partner-contact,../odoo-cd/untracked-odoo-apps

The paths will be appended to the Odoo config.

Initialize without demo data

In your .env file define this Odoo parameter env var.

ODOO_PARAM="--without-demo=all"

Docker

Run Odoo with Docker container.

Start and initialize Odoo with Docker

Set the Odoo addons path in your .env file:

ODOO_ADDONS_PATH=/mnt/addons/,/mnt/oca/,/mnt/enterprise,/mnt/themes/

Run Docker Compose.

task start

Initialize database. The parameter -d specifies the name of the parameter and is mandatory.

Use docker-odoo-init help to show all options.

docker-odoo-init -d odoo -i web

Open browser to http://localhost:8069 and login with admin:admin.

Install custom module

docker-odoo-install -m show_db_name

Common

Instructions that are true for Docker and native usage paths.

Change log level

To change the log level of Odoo set this env var in your .env file:

LOG_LEVEL=debug

Manage database with Docker

Open database manager http://localhost:8000/ and login with admin@example.com:admin.

Remove Docker containers

This removes containers and volumes.

task down

Stop all Docker containers

task stop

Remove database

task drop-db

Image

To build the Docker image setup these .env vars:

ODOO_REVISION=16.0.2024.0405
DOCKER_REGISTRY=mint-system/

Checkout the Odoo revision.

task checkout-revision

Build the Odoo image.

task build

Publish the Odoo image.

task publish

Mail

Start mail server.

task start mail

Setup mail server config for Odoo.

task setup-mail

Troubleshooting

Remove tracked submodule folders

Problem

The checkout command fails tue to unregistered submdoules.

Solution

Remove the submodule with git rm, f.e. git rm oca/dms.

inotify instance limit reached

Problem

While starting the native server this error is thrown:

OSError: [Errno 24] inotify instance limit reached

Solution

Increase inotify watch limit.

sudo vi /etc/sysctl.conf
fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=256
sudo sysctl -p

ImportError libldap

Problem

Instance with auth_ldap does not start.

ImportError: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory

Solution

Reinstall with pip flags.

pip install python-ldap --force-reinstall --no-binary python-ldap
S
Description
No description provided
Readme AGPL-3.0
13 MiB
0 Stars 3 Watchers 0 Forks
Languages
Shell 48.7%
Python 40.4%
JavaScript 7.6%
Dockerfile 2.8%
HTML 0.3%
Other 0.2%