Code Monkey home page Code Monkey logo

odoochain-build's Introduction

Odoo Build

This is the Mint System Odoo development environment.

This projects provides a highly opinionated way to develop Odoo and Odoo modules. It supports the following scenarios:

  • Docker Compose: Spin up a Odoo, Postgres and pgAdmin Docker container and experiment locally
  • Import and Export Database: Use Odoo scripts to copy and restore a remote customer database to the local development environment. Investigate issues and deploy the database at wish
  • Community Edition: Checkout the Odoo Community Edition and start editing the source code
  • Enterprise Modules: Checkout the Odoo enterprise modules and deploy them into the Odoo Docker container or the Odoo source.
  • Develop Modules: Scaffold a new module, develop new Odoo features locally and much more
  • Customizing Snippets: Create snippets and push them to an Odoo database
  • Odoo Scripts: Develope scripts to patch Odoo code
  • Odoo Image: Build and publish an Odoo Docker image

Requirements

The Odoo development environment has the following requirements:

Usage

The usage section is a set of workflows. Pick the one required by your scenario. See task help or task for details about the project commands.

Clone this repository.

git clone [email protected]:odoochain/odoochain-build.git
cd odoochain-build

Checkout branch.

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

Install Odoo scripts

task install-odoo-scripts

Native

Run Odoo from source. Currently supported OS: Ubuntu, Debian

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

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

Create a new module from source

Scaffold a new module.

task create-module addons/project_report

Load modules from thirdpary folder

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

ODOO_ADDONS_PATH=,thirdparty/modules/,../other/modules

The paths will be appended to the Odoo config.

Docker

Run Odoo with Docker container.

Start and initialize Odoo with Docker

Run docker compose.

task start

Initialize database.

docker-odoo-install

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.

Enable developer mode

Open this url http://localhost:8069/web?debug=1, which contains the debug flag.

Manage database with Docker

Open database manager http://localhost:8000/ and login with [email protected]:admin.

Remove Docker conainers

Kill docker containers and volumes.

task kill

Stop all Docker containers

task stop

Remove database

task drop-db

Image

To build the Docker image setup these .env vars:

ODOO_REVISION=16.5
DOCKER_REGISTRY=mint-system/

Build the Odoo image.

task build

Publish the Odoo image.

task publish

Mail

Setup mail server and client

Start mail server.

task start mail

Create a new account [email protected] and set odoo as password.
Create a new account [email protected] and set test as password.

Install a simple mail client such as Claws Mail and connect with credentials:

host: localhost
port: 25
username: [email protected]
password: test

For incoming mails use these informations:

server type: IMAP host: localhost
port: 143
username: [email protected]
password: test

Repeat the same for [email protected].

Setup incoming and outgoing mail for Odoo

Activate mail sever option with example.com domain.

For outgoing mails use these informations:

host: localhost
port: 25
username: [email protected]
password: odoo

For incoming mails use these informations:

server type: IMAP host: localhost
port: 143
username: [email protected]
password: odoo

Test mail exchange

Follow these steps to test a mail exchange:

  • Send mail in Odoo to [email protected]
  • In mail client create reply to the mail and save as draft
  • Copy the mail to the inbox of [email protected]
  • Trigger fetchmail in Odoo
  • Check if reply has been processed

Troubleshooting

inotify instance limit reached

Problem

While starting the native server this error is thrown:

OSError: [Errno 24] inotify instance limit reached

Solution

Increase ifnotify 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

odoochain-build's People

Contributors

janikvonrotz avatar kurtgisler avatar odoochain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.