<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Galuh Ibrahim</title>
    <description>The latest articles on Forem by Galuh Ibrahim (@galuh_ibrahim).</description>
    <link>https://forem.com/galuh_ibrahim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2745230%2F1c193c24-7374-4739-bfe3-4d93eada4e63.jpg</url>
      <title>Forem: Galuh Ibrahim</title>
      <link>https://forem.com/galuh_ibrahim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/galuh_ibrahim"/>
    <language>en</language>
    <item>
      <title>(Odoo Series) - #1. Simple Odoo Development on Ubuntu Desktop</title>
      <dc:creator>Galuh Ibrahim</dc:creator>
      <pubDate>Wed, 22 Jan 2025 05:46:24 +0000</pubDate>
      <link>https://forem.com/galuh_ibrahim/odoo-series-1-simple-odoo-development-on-ubuntu-desktop-28c0</link>
      <guid>https://forem.com/galuh_ibrahim/odoo-series-1-simple-odoo-development-on-ubuntu-desktop-28c0</guid>
      <description>&lt;p&gt;Greetings Dev.to community!&lt;/p&gt;

&lt;p&gt;Odoo, previously known as OpenERP, has become one of the most popular Enterprise Resource Planning (ERP) systems in the world. With more than 7 million global users, Odoo offers comprehensive and flexible integrated business solutions for organizations of all types and sizes.&lt;/p&gt;

&lt;p&gt;Odoo is an open source ERP platform developed by Odoo S.A., a Belgium-based company. Since its launch in 2005, Odoo has evolved from a simple business management system to a complete suite of business applications, covering various aspects of a company's operations.&lt;/p&gt;

&lt;p&gt;Here is my journey related to Odoo development in several applications that I am developing in my current company, I want this to be a useful odoo series for all of you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You should make sure to update the Linux library you are using&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install PostgreSQL Database, for how to install it, you can see the documentation &lt;a href="https://www.postgresql.org/download/linux/ubuntu/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create an Odoo User for Postgres&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt (change to your username)
exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;strong&gt;&lt;em&gt;pg_hba.conf&lt;/em&gt;&lt;/strong&gt; file with this command below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo gedit /etc/postgresql/(change with your postgresql version)/main/pg_hba.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, change the words &lt;u&gt;&lt;strong&gt;peer&lt;/strong&gt;&lt;/u&gt; to md5 on lines 90, 95, and 102, as shown below.&lt;br&gt;
&lt;strong&gt;FROM THIS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fas754lpq2a6p26gxsw6d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fas754lpq2a6p26gxsw6d.png" alt="Image description" width="753" height="293"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;TO THIS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp55dq3svmjronrtppn86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp55dq3svmjronrtppn86.png" alt="Image description" width="753" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;after that restart your PostgreSQL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service postgresql restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Download Source Odoo Community v16
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://nightly.odoo.com/16.0/nightly/src/odoo_16.0.latest.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Define the Odoo Source &amp;amp; Addons Path&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;. Create a &lt;strong&gt;Projects&lt;/strong&gt; folder on the ubuntu desktop&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98awa4isnf6po3jlvet2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98awa4isnf6po3jlvet2.png" alt="Image description" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B&lt;/strong&gt;. Move the Odoo folder into the &lt;strong&gt;Projects&lt;/strong&gt; folder, you will see the structure of our Odoo platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F213aunvc5mqdf4lhuhsi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F213aunvc5mqdf4lhuhsi.png" alt="Image description" width="545" height="517"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;strong&gt;C&lt;/strong&gt;. Create a folder called conf and create an &lt;strong&gt;&lt;em&gt;odoo.conf&lt;/em&gt;&lt;/strong&gt; file in it, then fill it with the following scipt.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzoyvmacol6w9wbjzz5l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzoyvmacol6w9wbjzz5l.png" alt="Image description" width="800" height="462"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;strong&gt;D&lt;/strong&gt;. Copy the &lt;strong&gt;&lt;em&gt;odoo&lt;/em&gt;&lt;/strong&gt; file in the setup folder, then move it to the root project, then change the file name to &lt;strong&gt;&lt;em&gt;odoo-server&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nncr6b5v6nqf4bxulio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nncr6b5v6nqf4bxulio.png" alt="Image description" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Odoo Library
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y git wget nodejs npm python3-pip python3-polib build-essential python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev python3-gevent

sudo npm install -g rtlcss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Install WKHTMLTOPDF Library
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb 

sudo apt install xfonts-75dpi

wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb

sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create Odoo Environment
Create a virtual environment for our odoo application, this is done to isolate the libraries we use when developing odoo modules using this command.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 -m venv env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After that, you can install all requirements library for your odoo using this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source env/bin/activate

pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftq8dogcibuf9gylwgtav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftq8dogcibuf9gylwgtav.png" alt="Image description" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run Odoo Service
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 odoo-server -c conf/odoo.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>erp</category>
      <category>python</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
