aAPT
dDebian
fFFmpeg
jJava
mMercurial: Usage
oOCaml
pPostgreSQL

Home Applications

Odoo ref

odoo.conf

Limits

limit_time_cpu

Worker CPU time limit in seconds.

Error when exceeded:

Worker (25204) CPU time limit (60) reached

limit_time_real

HTTP worker request limit in seconds.

Error when exceeded:

WorkerHTTP (25386) timeout after 120s

Command line

Update language translations

# sudo -u odoo -g odoo -- odoo --stop-after-init --load-language=lt_LT -c /etc/odoo/odoo.conf -d DATABASE

Update specific module

# sudo -u odoo -g odoo -- odoo --stop-after-init -u MODULE -c /etc/odoo/odoo.conf -d DATABSE

Use all in place of MODULE to update all modules.

Proxy

Nginx

odoo-common.conf
upstream odoo {
  server 127.0.0.1:8069;
}

upstream odoochat {
  server 127.0.0.1:8072;
}

map $http_upgrade $connection_upgrade {
  default upgrade;
  ''      close;
}
odoo-example.conf
server {
  listen 443 ssl;
  server_name example.org;

  proxy_read_timeout 720s;
  proxy_connect_timeout 720s;
  proxy_send_timeout 720s;

  ssl_certificate /etc/nginx/ssl/certs/example.org/fullchain.pem;
  ssl_certificate_key /etc/nginx/ssl/certs/example.org/privkey.pem;
  ssl_session_timeout 30m;
  ssl_protocols TLSv1.2;
  ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  ssl_prefer_server_ciphers off;

  access_log /var/log/nginx/example.access.log;
  error_log /var/log/nginx/example.error.log;

  location /websocket {
    proxy_pass http://odoochat;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
  }

  location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_redirect off;
    proxy_pass http://odoo;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
    client_max_body_size 500M;
  }

  gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
  gzip on;
}

Database

Get Odoo version

SELECT latest_version FROM ir_module_module WHERE name = 'base';

Get Odoo edition (community/enterprise)

SELECT license, count(*) FROM ir_module_module where state = 'installed' group by license;

Resources

18 apt instructions
18 nightly packages