odoo源码安装

news2025/12/22 3:15:14

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1854486.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

SLAM Paper Reading和代码解析

最近对VINS、LIO-SAM等重新进行了Paper Reading和代码解析。这两篇paper和代码大约在三年前就读过,如今重新读起来,仍觉得十分经典,对SLAM算法研发具有十分重要的借鉴和指导意义。重新来读,对其中的一些关键计算过程也获得了更新清…

java的输出流File OutputStream

一、字节输出流FileOutput Stream 1、定义 使用OutputStream类的FileOutput Stream子类向文本文件写入的数据。 2.常用构造方法 3.创建文件输出流对象的常用方式 二、输出流FileOutputStream类的应用示例 1.示例 2、实现步骤 今天的总结就到此结束啦,拜拜&#x…

JVM专题七:JVM垃圾回收机制

JVM专题六:JVM的内存模型中,我们介绍了JVM内存主要分哪些区域,这些区域分别是干什么的,同时也举了个例子,在运行过程种各个区域数据是怎样流转的。细心的小伙伴可能发现一个问题,在介绍完方法弹栈以后就没有…

SQL找出所有员工当前薪水salary情况

系列文章目录 文章目录 系列文章目录前言 前言 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站,这篇文章男女通用,看懂了就去分享给你的码吧。 描述 有一个薪水表…

13.爬虫---PyMongo安装与使用

13.PyMongo安装与使用 1.安装 PyMongo2.使用PyMongo2.1连接数据库和集合2.2增加数据2.3修改数据2.4查询数据2.5删除数据 3.总结 MongoDB 安装可以看这篇文章MongoDB安装配置教程(详细版) 1.安装 PyMongo PyMongo 是Python中用于连接MongoDB数据库的库&a…

win32API(CONSOLE 相关接口详解)

前言: Windows这个多作业系统除了协调应⽤程序的执⾏、分配内存、管理资源之外,它同时也是⼀个很⼤的服务中⼼,调⽤这个服务中⼼的各种服务(每⼀种服务就是⼀个函数),可以帮应⽤程式达到开启视窗、描绘图形…

Linux使用——查看发行版本、内核、shell类型等基本命令

先做快照 虚拟机中编辑网络 关机 普通账户和管理员账户 互相对照 localhost相当于IP 参数: 短格式:以减号(-)开头,参数字母 长格式:以2个减号(--)后跟上完整的参数单词 当前发行版本 [rootserver ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 9.…

区块链技术原理

1.起源: ➢ 中本聪(Satoshi Nakamoto), 2008 ➢ 比特币:一种点对点的电子现金系统 2.分布式账本技术原理 ➢ 将交易向全网所有节点进行广播 ➢ 众多记账节点对记账权达成共识,由共识确认的记账节点把记账区块发布给全网 ➢ 所有账本数据完整存储于区块…

ADD属性驱动架构设计(一)

目录 一、架构设计过程 1.1、架构设计过程 1.1.1、设计目的 1.1.2、质量属性(非功能需求) 1.1.3、核心功能(功能需求) 1.1.4、架构关注 1.1.5、约束条件 1.2、基于设计过程 二、什么是ADD? 三、为什么选择ADD? 四、作…

OpenGL3.3_C++_Windows(18)

接口块: glsl彼此传输数据,通过in / out,当更多的变量,涉及数组和结构体接口块(Interface Block)类似struct,in / out 块名{……}实例名 Uniform缓冲对象: 首先理解uniform Object:负责向gl…

RTSP协议分析与安全实践

RTSP协议,全称实时流协议(Real Time Streaming Protocol),前文已经简单介绍了RTSP相关协议; RTSP和RTP(RTCP) 这里再提一下RTSP和RTP/RTCP、RSVP的关系;如图: RTSP和HTTP 相似性:RTSP和HTTP协议都使用纯…

Android13 WMS窗口层级树

1,认识层级树 可以通过dumpsys activity containers 看到 WMS 层级树的结构 ACTIVITY MANAGER CONTAINERS (dumpsys activity containers) ROOT typeundefined modefullscreen override-modeundefined requested-bounds[0,0][0,0] bounds[0,0][1440,2960]#0 Displa…

【驱动篇】龙芯LS2K0300之单总线驱动

实验过程 实验目的: 在龙芯开发板上面使用单总线驱动DS18B20温度传感器 ① 根据原理图连接DS18B20模块 ② 将i2c0引脚的功能复用为GPIO ③ 注册字符设备,按照DS18B20的读写时序编写读写驱动接口 ④ 编写测试用例解析传感器的数值 原理图 将板子上…

细粒度图像分类论文阅读笔记

细粒度图像分类论文阅读笔记 摘要Abstract1. 用于细粒度图像分类的聚合注意力模块1.1 文献摘要1.2 研究背景1.3 本文创新点1.4 计算机视觉中的注意力机制1.5 模型方法1.5.1 聚合注意力模块1.5.2 通道注意力模块通道注意力代码实现 1.5.3 空间注意力模块空间注意力代码实现 1.5.…

[MQTT]Mosquitto的權限管理_使用者/密碼(pwfile)和訪問控制清單(aclfile)

延續Mosquitto的內網連接(intranet)和使用者/密碼權限設置文章,經解讀mosquitto官網文檔,在權限管理部分,除了設置使用者/密碼(pwfile)之外,還有訪問控制清單(Access Control List, aclfile)可以設置。經過測試,同時設…

Python中使用PyQT5库时报错:没有Qt平台插件可以初始化

一、发现问题:无限易pythonGo打开执行的时候报:“没有Qt平台插件可以初始化,请重新安装应用程序。”的错误,点击确定后无限易崩溃闪退。 二、解决问题: 1、重新安装依赖,打开CMD输入pip list,查…

开发uniapp插件包aar文件,使uniapp可以调用jar包

背景 使用 uniapp 开发应用时,很多时候都需要调用第三方的sdk,一般以 jar 为主。为了应对这个问题,官方提供了插件方案,可以将第三方 jar 包进行封装为 aar 包后,再集成到 uniapp 中使用。 一、环境安装工具 1、jdk…

拓扑排序——C语言

拓扑排序(Topological Sorting)是一种用于有向无环图(DAG)的排序算法,其输出是图中所有顶点的线性排序,使得对于每条有向边 (u, v),顶点 u 在 v 之前出现。拓扑排序确定了项目网络图中的起始事件…

嵌入式中逻辑分析仪与示波器的基本原理

大家好,今天主要给大家分享一下,嵌入式中如何使用逻辑分析仪和示波器的方法,希望对大家有所帮助。 https://dreamsourcelab.cn/ 第一:什么是逻辑分析仪 是否遇到使用示波器分析数字电路的冏境:深度不够,时间太短,无法抓到想要的波形,没有协议内容解析? 逻辑分析仪…

深度学习11-13

1.神经元的个数对结果的影响: (http://cs.stanford.edu/people/karpathy/convnetjs/demo/classify2d.html) (1)神经元3个的时候 (2)神经元是10个的时候 神经元个数越多,可能会产生…