odoo源码安装

2024-06-24 03:20
文章标签 源码 安装 odoo

本文主要是介绍odoo源码安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

The source ‘installation’ is not about installing Odoo but running it directly from the source instead.

Using the Odoo source can be more convenient for module developers as it is more easily accessible than using packaged installers.

It makes starting and stopping Odoo more flexible and explicit than the services set up by the packaged installers. Also, it allows overriding settings using command-line parameters without needing to edit a configuration file.

Finally, it provides greater control over the system’s setup and allows to more easily keep (and run) multiple versions of Odoo side-by-side.

Fetch the sources

There are two ways to obtain the source code of Odoo: as a ZIP archive or through Git.

Archive

Community edition:

  • Odoo download page

  • GitHub Community repository

  • Nightly server

Enterprise edition:

  • Odoo download page

  • GitHub Enterprise repository

Git

 Note

It is required to have Git installed, and it is recommended to have a basic knowledge of Git commands to proceed.

To clone a Git repository, choose between cloning with HTTPS or SSH. In most cases, the best option is HTTPS. However, choose SSH to contribute to Odoo source code or when following the Getting Started developer tutorial.

LinuxWindowsMac OS

Clone with HTTPSClone with SSH

$ git clone https://github.com/odoo/odoo.git
$ git clone https://github.com/odoo/enterprise.git

 Note

The Enterprise git repository does not contain the full Odoo source code. It is only a collection of extra add-ons. The main server code is in the Community edition. Running the Enterprise version means running the server from the Community version with the addons-path option set to the folder with the Enterprise edition. It is required to clone both the Community and Enterprise repositories to have a working Odoo Enterprise installation.

Prepare

Python

Odoo requires Python 3.10 or later to run.

Changed in version 17: Minimum requirement updated from Python 3.7 to Python 3.10.

LinuxWindowsMac OS

Use a package manager to download and install Python 3 if needed.

 Note

If Python 3 is already installed, make sure that the version is 3.10 or above, as previous versions are not compatible with Odoo.

LinuxWindowsMac OS

$ python3 --version

Verify that pip is also installed for this version.

LinuxWindowsMac OS

$ pip3 --version

PostgreSQL

Odoo uses PostgreSQL as its database management system.

LinuxWindowsMac OS

Use a package manager to download and install PostgreSQL (supported versions: 12.0 or above). It can be achieved by executing the following:

$ sudo apt install postgresql postgresql-client

By default, the only user is postgres. As Odoo forbids connecting as postgres, create a new PostgreSQL user.

LinuxWindowsMac OS

$ sudo -u postgres createuser -d -R -S $USER
$ createdb $USER

 Note

Because the PostgreSQL user has the same name as the Unix login, it is possible to connect to the database without a password.

Dependencies

LinuxWindowsMac OS

Using distribution packages is the preferred way of installing dependencies. Alternatively, install the Python dependencies with pip.

Debian/UbuntuInstall with pip

On Debian/Ubuntu, the following commands should install the required packages:

$ cd odoo #CommunityPath
$ sudo ./setup/debinstall.sh

The setup/debinstall.sh script will parse the debian/control file and install the found packages.

 Note

For languages using a right-to-left interface (such as Arabic or Hebrew), the rtlcss package is required.

LinuxWindowsMac OS

  1. Download and install nodejs and npm with a package manager.

  2. Install rtlcss:

    $ sudo npm install -g rtlcss
    

 Warning

wkhtmltopdf is not installed through pip and must be installed manually in version 0.12.6 for it to support headers and footers. Check out the wkhtmltopdf wiki for more details on the various versions.

Running Odoo

Once all dependencies are set up, Odoo can be launched by running odoo-bin, the command-line interface of the server. It is located at the root of the Odoo Community directory.

To configure the server, either specify command-line arguments or a configuration file.

 Tip

For the Enterprise edition, add the path to the enterprise add-ons to the addons-path argument. Note that it must come before the other paths in addons-path for add-ons to be loaded correctly.

Common necessary configurations are:

  • PostgreSQL user and password.

  • Custom addon paths beyond the defaults to load custom modules.

A typical way to run the server would be:

LinuxWindowsMac OS

$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb

Where CommunityPath is the path of the Odoo Community installation, and mydb is the name of the PostgreSQL database.

After the server has started (the INFO log odoo.modules.loading: Modules loaded. is printed), open http://localhost:8069 in a web browser and log into the Odoo database with the base administrator account: use admin as the email and, again, admin as the password.

 Tip

  • From there, create and manage new users.

  • The user account used to log into Odoo’s web interface differs from the --db_user CLI argument.

 See also

The list of CLI arguments for odoo-bin

这篇关于odoo源码安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1089039

相关文章

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

Python实现无痛修改第三方库源码的方法详解

《Python实现无痛修改第三方库源码的方法详解》很多时候,我们下载的第三方库是不会有需求不满足的情况,但也有极少的情况,第三方库没有兼顾到需求,本文将介绍几个修改源码的操作,大家可以根据需求进行选择... 目录需求不符合模拟示例 1. 修改源文件2. 继承修改3. 猴子补丁4. 追踪局部变量需求不符合很

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是

Linux安装MySQL的教程

《Linux安装MySQL的教程》:本文主要介绍Linux安装MySQL的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux安装mysql1.Mysql官网2.我的存放路径3.解压mysql文件到当前目录4.重命名一下5.创建mysql用户组和用户并修

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

Python解析器安装指南分享(Mac/Windows/Linux)

《Python解析器安装指南分享(Mac/Windows/Linux)》:本文主要介绍Python解析器安装指南(Mac/Windows/Linux),具有很好的参考价值,希望对大家有所帮助,如有... 目NMNkN录1js. 安装包下载1.1 python 下载官网2.核心安装方式3. MACOS 系统安

Spring 中 BeanFactoryPostProcessor 的作用和示例源码分析

《Spring中BeanFactoryPostProcessor的作用和示例源码分析》Spring的BeanFactoryPostProcessor是容器初始化的扩展接口,允许在Bean实例化前... 目录一、概览1. 核心定位2. 核心功能详解3. 关键特性二、Spring 内置的 BeanFactory

Pycharm安装报错:Cannot detect a launch configuration解决办法

《Pycharm安装报错:Cannotdetectalaunchconfiguration解决办法》本文主要介绍了Pycharm安装报错:Cannotdetectalaunchconfigur... 本文主要介绍了Pycharm安装报错:Cannot detect a launch configuratio