Install Odoo di MacBook macos(catalina) tanpa Docker

Install PostgreSQL 

Install postgreSQL interactive installer by edb

Lalu download postgreSQL beberapa versi dari yang terbaru hingga selera anda dengan (homebrew)
Untuk menjalankan postgresql dan membagi sesuai port dengan mudah install postgresql.app dengan klik yang additional release sehingga bisa menginstall beberapa postgresql dan mengatur port nya sesuai dengan masing masing versi postgresql

download versi Odoo di github

Buatlah venv pada user dengan cara

python -m venv venv atau python3 -m venv venv

Aktifkan dengan source venv/bin/activate

Export path postgresql

export PATH=/usr/local/opt/postgresql@13/bin:$PATH

Install libraru odoo homebrew

brew install freetype jpeg libpng libtiff webp xz

brew install werkzeug


npm install -g rtlcss

Install library

pip install pypdf2 && pip install passlib && pip install babel && pip install werkzeug && pip install lxml && pip install decorator && pip install polib && pip install pillow && pip install psycopg2 && pip install requests && pip install jinja2 && pip install reportlab && pip install html2text && pip install docutils && pip install numpy && pip install num2words && pip install libsass

pip install python-dateutil

pip install  psutil

pip install setuptools wheel

Extrack file odoo yg didownload dari github lalu pindahkan file nya ke users/namamac

Jika file download berupa zip dan di librari download maka arahkan ke download

cd Downloads

sudo mv odoo-x /Users/syaifulstyle

setelah itu buat file untuk menjalankan odoo nya

nano /usr/local/bin/odoo13

dan masukan perintah

#!/bin/sh

cd ~/Odoo/odoo-13.0

exec /Users/syaifulstyle/venv/bin/python3 ./odoo-bin $@

Dimana exec nya bisa diubah jika tidak ingin menggunakan venv atau bisa dengan conda tinggal arahkan saja dan penggunaan pythonya

lalu berikan akses chmod +x /usr/local/bin/odoo13

Buat confignya

odoo13 -sc /tmp/odoo13.conf (default)

Lalu pindahkan difolder yg mudah 

sudo mv /tmp/odoo13.conf /etc/

dan buka nano /etc/odoo13.conf

edit bagian 10 menjadi 13 dan tambah direktori path tambahan juga edit port postgresql dan port pada web

jalankan kembali odoo13 nya

lalu akses webnya

CATATAN : PADA DIR TAMBAHKAN 13 SEHINGGA MENJADI

data_dir = /Users/syaifulstyle/Library/Application Support/Odoo/13

Sehingga file cache akan terpisah jika install beberapa versi odoo

Errorr saat Runing odoo

ERORR PATH

2021-11-10 16:18:02,710 79895 INFO ? odoo: Odoo version 13.0 

2021-11-10 16:18:02,711 79895 INFO ? odoo: Using configuration file at /etc/odoo13.conf 

2021-11-10 16:18:02,711 79895 INFO ? odoo: addons paths: ['/Users/syaifulstyle/Odoo/odoo-13.0/odoo/addons', '/Users/syaifulstyle/Library/Application Support/Odoo/13.0/addons/13.0', '/Users/syaifulstyle/odoo-13/odoo/addons', '/Users/syaifulstyle/odoo-13/addons', '/Users/syaifulstyle/Documents/odoo13/addons'] 

2021-11-10 16:18:02,711 79895 INFO ? odoo: database: default@default:5432 

2021-11-10 16:18:03,399 79895 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports. 

2021-11-10 16:18:04,527 79895 CRITICAL ? odoo.modules.module: Couldn't load module web 

2021-11-10 16:18:04,527 79895 CRITICAL ? odoo.modules.module: No module named 'odoo.addons.web' 

2021-11-10 16:18:04,527 79895 ERROR ? odoo.service.server: Failed to load server-wide module `web`.

The `web` module is provided by the addons found in the `openerp-web` project.

Maybe you forgot to add those addons in your addons_path configuration. 

Traceback (most recent call last):

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/server.py", line 1140, in load_server_wide_modules

    odoo.modules.module.load_openerp_module(m)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/modules/module.py", line 404, in load_openerp_module

    __import__('odoo.addons.' + module_name)

ModuleNotFoundError: No module named 'odoo.addons.web'


Error ini disebabkan oleh PATH yg belum terbaca atau path yg tidak terbaca
lakukan reset config lagi  dengan cara
odoo13 -sc /tmp/odoo13.conf (/tmp adalah direktori untuk mearuh file nya dan odoo13.conf adalah untuk membuatnya secara otomatis)
setelah masuk maka ctrl+c 2x untuk stop lalu pindahkan file odoo13.conf ke etc
sudo mv /tmp/odoo13.conf /etc/

buka file dari odoo13.conf dengan nano odoo13.conf dan periksa pada bagian path untuk dibenarkan lokasi atau direktorinya lalu save ctrl+x lalu y dan enter
mulai kembali....

ERORR DATABASE

2021-11-10 16:33:00,508 80992 ERROR syaifulstyle odoo.modules.loading: Database syaifulstyle not initialized, you can force it with `-i base` 

2021-11-10 16:33:00,518 80992 INFO syaifulstyle werkzeug: 127.0.0.1 - - [10/Nov/2021 16:33:00] "GET / HTTP/1.1" 500 - 11 6.586 2.527

2021-11-10 16:33:00,708 80992 ERROR syaifulstyle werkzeug: Error on request:

Traceback (most recent call last):

  File "/Users/syaifulstyle/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 270, in run_wsgi

    execute(self.server.app)

  File "/Users/syaifulstyle/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 258, in execute

    application_iter = app(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/server.py", line 441, in app

    return self.app(e, s)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/wsgi_server.py", line 142, in application

    return application_unproxied(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/wsgi_server.py", line 117, in application_unproxied

    result = odoo.http.root(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/http.py", line 1287, in __call__

    return self.dispatch(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/http.py", line 1441, in dispatch

    ir_http = request.registry['ir.http']

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/modules/registry.py", line 176, in __getitem__

    return self.models[model_name]

KeyError: 'ir.http' - - -

^X2021-11-10 16:33:10,116 80992 INFO ? odoo.http: HTTP Configuring static files 

2021-11-10 16:33:10,137 80992 INFO syaifulstyle werkzeug: 127.0.0.1 - - [10/Nov/2021 16:33:10] "GET / HTTP/1.1" 500 - 2 0.005 0.009

2021-11-10 16:33:10,158 80992 ERROR syaifulstyle werkzeug: Error on request:

Traceback (most recent call last):

  File "/Users/syaifulstyle/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 270, in run_wsgi

    execute(self.server.app)

  File "/Users/syaifulstyle/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 258, in execute

    application_iter = app(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/server.py", line 441, in app

    return self.app(e, s)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/wsgi_server.py", line 142, in application

    return application_unproxied(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/service/wsgi_server.py", line 117, in application_unproxied

    result = odoo.http.root(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/http.py", line 1287, in __call__

    return self.dispatch(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/http.py", line 1257, in __call__

    return self.app(environ, start_wrapped)

  File "/Users/syaifulstyle/venv/lib/python3.8/site-packages/werkzeug/wsgi.py", line 766, in __call__

    return self.app(environ, start_response)

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/http.py", line 1441, in dispatch

    ir_http = request.registry['ir.http']

  File "/Users/syaifulstyle/Odoo/odoo-13.0/odoo/modules/registry.py", line 176, in __getitem__

    return self.models[model_name]

KeyError: 'ir.http' - - -


Jika muncul eror tersebut maka yang perlu diketahui adalah databasenya pernah dihapus sebelumnya lalu install odoo kembali maka file database tidak akan singkron
reset database dengan ke menu config
nano /etc/odoo13.conf
langsung ke menu dbfilter dan ubah menjadi

dbfilter = odoo13

Lalu start webnya dan buat databasenya
setelah itu odoo dbfilter akan menolak akses masuk
hentikan web odoo nya lalu ubah config db filter menjadi

dbfilter =

Ya kembalikan seperti semula
lalu start kembali dan refresh webnya maka akan keluar database yang tadi dibuat

ERRORR PORT POSTGRESQL 


Cek port :

sudo lsof -i :5432

EROR ini disebabkan jikalau kalian mematikan perangkat laptop atau pc kalian tanpa prosedur yang benar sehingga port masih berjalan untuk mengembalikanya bisa dengan perintah
Cara 1 : sudo kill -9 PID
Cara 2 : sudo pkill -u postgres
Dan klik start lagi

ERROR PERMISION / ACCES DENIED (ODOO10)

EROR ini terjadi karena pasword pada admin masih ke reset master dari postgresql cara mengatasinya
stop server
buka configuration : nano /etc/odoo10.conf
lalu ubah pasword 

admin_passwd = $pbkdf2-sha512$25000$YcxZK.X839t7D.F8bw3h3A$nCn5SDle8YvIACA/Dwo85LVR1jr/o1/FpNUgDJk6LrCk.b$


Menjadi

admin_passwd = admin


Restaer server lalu Coba buat database kembali

ERRORR NPM -g less (ODOO10)

2021-11-12 03:17:06,441 2095 WARNING Odoo-10 odoo.addons.base.ir.ir_qweb.assetsbundle: The "--no-js" argument is deprecated, as inline JavaScript is disabled by default. Use "--js" to enable inline JavaScript (not recommended).

ArgumentError: Error evaluating function `floor`: argument must be a number in - on line 2472, column 18:

2471 @planner-height: 13px;

2472 @planner-margin: floor((@odoo-navbar-height - 2 - @planner-height)/2);

2473 .o_planner_systray {


This error occured while compiling the bundle 'web.assets_common' containing:

    - /web/static/lib/bootstrap/less/variables.less

    - /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less

    - /web/static/lib/bootstrap/less/mixins/buttons.less

    - /web/static/src/less/variables.less

    - /web/static/src/less/utils.less

    - /web_editor/static/src/less/web_editor.variables.less

    - /web/static/src/less/fonts.less

    - /web/static/src/less/navbar.less

    - /web/static/src/less/mimetypes.less

    - /web/static/src/less/animation.less

    - /web/static/lib/bootstrap-datetimepicker/src/less/bootstrap-datetimepicker.less

    - /web_planner/static/src/less/web_planner_common.less

    - /web_tour/static/src/less/tip.less

    - /web_tour/static/src/less/keyframes.less

2021-11-12 03:17:07,987 2095 WARNING Odoo-10 odoo.addons.base.ir.ir_qweb.assetsbundle: The "--no-js" argument is deprecated, as inline JavaScript is disabled by default. Use "--js" to enable inline JavaScript (not recommended).

SyntaxError: Error evaluating function `floor`: argument must be a number in - on line 2866, column 9:

2865         // o_group contains nested groups

2866         .o-generate-groups(@odoo-form-group-cols);

2867         .o-generate-groups(@n, @i: 1) when (@i =< @n) {


This error occured while compiling the bundle 'web.assets_backend' containing:

    - /web/static/lib/bootstrap/less/variables.less

    - /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less

    - /web/static/lib/bootstrap/less/mixins/buttons.less

    - /web/static/src/less/variables.less

    - /web/static/src/less/utils.less

    - /web_editor/static/src/less/web_editor.variables.less

    - /web/static/src/less/import_bootstrap.less

    - /web/static/src/less/bootstrap_overridden.less

    - /web/static/src/less/webclient_extra.less

    - /web/static/src/less/webclient_layout.less

    - /web/static/src/less/webclient.less

    - /web/static/src/less/datepicker.less

    - /web/static/src/less/progress_bar.less

    - /web/static/src/less/dropdown.less

    - /web/static/src/less/tooltip.less

    - /web/static/src/less/debug_manager.less

    - /web/static/src/less/control_panel.less

    - /web/static/src/less/control_panel_layout.less

    - /web/static/src/less/views.less

    - /web/static/src/less/pivot_view.less

    - /web/static/src/less/graph_view.less

    - /web/static/src/less/tree_view.less

    - /web/static/src/less/form_view_layout.less

    - /web/static/src/less/form_view.less

    - /web/static/src/less/list_view.less

    - /web/static/src/less/search_view.less

    - /web/static/src/less/modal.less

    - /web/static/src/less/data_export.less

    - /web/static/src/less/switch_company_menu.less

    - /web/static/src/less/dropdown_extra.less

    - /web/static/src/less/views_extra.less

    - /web/static/src/less/form_view_extra.less

    - /web/static/src/less/form_view_layout_extra.less

    - /web/static/src/less/search_view_extra.less

    - /base_import/static/src/less/base_import.less

    - /web_calendar/static/src/less/web_calendar.less

    - /web_diagram/static/src/less/diagram_view.less

    - /web_editor/static/src/less/web_editor.common.less

    - /web_editor/static/src/less/web_editor.backend.less

    - /web_kanban/static/src/less/kanban_dashboard.less

    - /web_kanban/static/src/less/kanban_view.less

    - /web_settings_dashboard/static/src/less/dashboard.less

Eror ini karena -g less yg diinstall di odoo10 tidak suport maka install 

sudo npm install -g less@3.0.4 less-plugin-clean-css 


ERRORR LIBRARY (PY2.7)

Traceback (most recent call last):

  File "./odoo-bin", line 5, in <module>

    __import__('pkg_resources').declare_namespace('odoo.addons')

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2268, in declare_namespace

    declare_namespace(parent)

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2284, in declare_namespace

    _handle_ns(packageName, path_item)

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2217, in _handle_ns

    loader.load_module(packageName)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 243, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/__init__.py", line 60, in <module>

    import modules

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/modules/__init__.py", line 8, in <module>

    from . import db, graph, loading, migration, module, registry

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/modules/graph.py", line 13, in <module>

    import odoo.osv as osv

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/osv/__init__.py", line 4, in <module>

    import osv

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/osv/osv.py", line 4, in <module>

    from ..exceptions import except_orm

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/exceptions.py", line 15, in <module>

    from tools.func import frame_codeinfo

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/__init__.py", line 9, in <module>

    from convert import *

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/convert.py", line 24, in <module>

    from .yaml_import import convert_yaml_import

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/yaml_import.py", line 12, in <module>

    import yaml

ImportError: No module named yaml


Eror ini adalah tidak ada module yaml di site-package py2.7
Lakukan  pip install pyyaml
Jalankan kembali servernya.

Error Library ke 2 (Py2.7)

Traceback (most recent call last):

  File "./odoo-bin", line 5, in <module>

    __import__('pkg_resources').declare_namespace('odoo.addons')

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2268, in declare_namespace

    declare_namespace(parent)

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2284, in declare_namespace

    _handle_ns(packageName, path_item)

  File "/Users/syaifulstyle/py27venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2217, in _handle_ns

    loader.load_module(packageName)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 243, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/__init__.py", line 65, in <module>

    import service

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/service/__init__.py", line 8, in <module>

    import wsgi_server

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/service/wsgi_server.py", line 24, in <module>

    import werkzeug.contrib.fixers

ImportError: No module named contrib.fixers

Eror ini disebabkan file dari werkzeug tidak suport 
coba dengan install pip install werkzeug==1.0.0
Jika masih sama maka turunkan werkazeug menjadi pip install werkzeug==0.16.0
Jalankan kembali servernya.

ERRORR VALUE UNKNOWN LOCALE : UTF:8 (PY2.7)

Traceback (most recent call last):

  File "./odoo-bin", line 9, in <module>

    odoo.cli.main()

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/cli/command.py", line 64, in main

    o.run(args)

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/cli/server.py", line 175, in run

    main(args)

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/cli/server.py", line 124, in main

    odoo.tools.config.parse_config(args)

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/config.py", line 317, in parse_config

    odoo.netsvc.init_logger()

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/netsvc.py", line 122, in init_logger

    resetlocale()

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/translate.py", line 1186, in resetlocale

    for ln in get_locales():

  File "/Users/syaifulstyle/odoo/odoo-10/odoo/tools/translate.py", line 1155, in get_locales

    lang = locale.getdefaultlocale()[0]

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 545, in getdefaultlocale

    return _parse_localename(localename)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename

    raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8

Jika pada mac biasanya harus di export untuk penggunaan UTF-8 terhadap python 2.7
Maka lakukan :

export LC_ALL=en_US.UTF-8

export LANG=en_US.UTF-8

Jalankan kembali servernya.

Untuk Odoo10 / Versi yang bisa dijalankan di python2.7

Buat python2.7 venv

Jika anda terhubung dengan conda (base) maka lepas dulu dengan : conda deactivate

lalu untuk penginstalan :

virtualenv -p /usr/bin/python2.7 py27venv


Kalau virtualenv not found install dulu
pip install virtualenv
setelah itu lakukan instalasi diatas
Jika hasilnya 

created virtual environment CPython2.7.16.final.0-64 in 14657ms

  creator CPython2macOsFramework(dest=/Users/syaifulstyle/py27venv, clear=False, no_vcs_ignore=False, global=False)

  seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/Users/syaifulstyle/Library/Application Support/virtualenv)

    added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.0

  activators NushellActivator,PythonActivator,FishActivator,CShellActivator,PowerShellActivator,BashActivator


Maka terbuat di dest=xxx (nama direktori) 
creator CPython2macOsFramework(dest=/Users/syaifulstyle/py27venv, clear=False, no_vcs_ignore=False, global=False)

Cek dulu dengan Comand+shift+G lalu ketik /Users/namamac/


Setelah itu masuk ke py27venv : source /py27venv/bin/activate
maka akan :

(py27venv) syaifulstyle@syaifuls-MBP py27venv % cd ..

ada (py27venv) lalu lakukan instalasi package library nya maka akan masuk ke site dari environment python 2.7
dan untuk penginstalan odoo bisa lakukan hal yg diatas
dengan ketentuan exec nya ke py27venv.

Untuk port dari odoo-10 jika ingin diubah maka ubahlah

xmlrpc_port = 8010