Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Odoo.py CLI

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
3 Replies
6039 Tampilan
Avatar
Hieu Lam

HI everyone, 

I'm new to odoo. Recently, I need to automate our build process for odoo. And this is some approach that I intend to try 

1. Use cli odoo.py as background process but the problem is that everytime I run odoo.py, it create a new process ?

2. I could create a daemon thread as describe in this tutorial  https://www.linode.com/docs/websites/cms/install-odoo-9-erp-on-ubuntu-14-04. So that the CI server can stop/start odoo server easily. 

I still struggling with #2 but cannot run the server successfully yet. Does anyone have experience automate the odoo build before and share the experience with me ?

Thanks a lot in advance. 


0
Avatar
Buang
Avatar
Mateo Tibaquira
Jawaban Terbai

I recommend you to visit Yenthe's Blog (www.odoo.yenthevg.com), where he got some clean tutorials on Odoo installation.

0
Avatar
Buang
Avatar
erpdodo
Jawaban Terbai

Hi Hieu Lam,

you can create odoo script start in ubuntu by:

create file bash:

#!/bin/bash

### BEGIN INIT INFO

# Provides: odoo

# Required-Start: $remote_fs $syslog

# Required-Stop: $remote_fs $syslog

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Start odoo daemon at boot time# Description: Enable service provided by daemon.

# X-Interactive: true

### END INIT INFO

## more info: http://wiki.debian.org/LSBInitScripts

. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

DAEMON=/usr/bin/odoo

NAME=odoo

DESC=odoo

CONFIG=/etc/odoo/odoo.conf

LOGFILE=/var/log/odoo/odoo-server.log

PIDFILE=/var/run/${NAME}.pid

USER=odoo

export LOGNAME=$USER

test -x $DAEMON || exit 0set -e

function _start() {

    start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --config $CONFIG --logfile $LOGFILE

}

function _stop() {

    start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --retry 3

     rm -f $PIDFILE}

function _status() {

    start-stop-daemon --status --quiet --pidfile $PIDFILE

    return $?

}

case "$1" in

        start)

                echo -n "Starting $DESC: "

                _start echo "ok"

                ;;

        stop)

                echo -n "Stopping $DESC: "

                _stop echo "ok"

                ;;

        restart|force-reload)

                echo -n "Restarting $DESC: "

                _stop sleep 1

                _start echo "ok"

                ;;

        status)

                echo -n "Status of $DESC: "

                _status && echo "running" || echo "stopped"

                ;;

        *)    

                N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload|status}" >&2

                exit 1 ;;

esac

exit 0


This file in source odoo: /odoo/debian/init

put file in /etc/init.d/<file name>

after run: /etc/init.d/<file name> start


hope to help you.

0
Avatar
Buang
Avatar
Hieu Lam
Penulis Jawaban Terbai

Hi all, 

After lots of time on #2 approach, I still cannot make odoo running in daemon thread. So I switch back to #1 and this is the final script that work for me. If you are in the same situation, hope that help. 


#!bin/bash

sudo kill -9 /var/run/odoo-server.pid

/opt/odoo/odoo-server/odoo.py -d <db_name> -r <db_user> -w <db_password> --addons-path <addons path> -u <modules to update upon startup> > /var/log/odoo/odoo-server.log 2>&1 & 

echo $! > /var/run/odoo-server.pid


0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now