Odoo 14 custom addons Dev ubuntu 20.04

Amin
mabttech
Published in
4 min readFeb 14, 2022

you can check out part 1 of odoo installation on ubuntu 20.04
then start this tuto

* chap 1: Create and start your first Odoo instances:

createdb odoo-testpython3 odoo-bin -d odoo-test -i base --addons-path=addons --db-filter=odoo-test$./odoo-bin -d odoo-test -i base --addons-path=addons--db-filter=odoo-test$python3 odoo-bin -d odoo-test -i base

to start odoo correctly :

sudo apt-get install postgresqlsudo apt-get install postgresql postgresql-client

Finally worked when restarting VM :

python3 odoo-bin -d odoo-test -i base
page 60 ↓

Storing the instance configuration in a file :

$ ./odoo-bin --save --config myodoo.cfg --stop-after-init$ ./odoo-bin -c myodoo.cf

Activate the developer mode :

https://stackoverflow.com/questions/66004595/how-to-activate-developer-mode-in-odoo-14

Activate through the URL :

In the URL addㅤ ?debug=1 ㅤorㅤ ?debug=true ㅤafter web.

http://localhost:8069/web?debug=1#action=35&model=ir.module.module&view_type=kanban&cids=1&menu_id=5

Login as admin then change the URL :

* Storing the instance configuration in a file :

page 60 — ebook
$ ./odoo-bin --save --config myodoo.cfg --stop-after-init$ ./odoo-bin -c myodoo.cf
you can change your odoo-test master password

* Chap2 — Managing Odoo Server Instance :

Configuring the add-ons path :

#old (myodoo.cfg):  addons_path = /root/odoo-dev/odoo/odoo/addons,/root/odoo-dev/odoo/addons#new (in the ebook ) (myodoo.cfg) :addons_path = ~/odoo-dev/odoo/addons,~/odoo-dev/local-addons

Restart your instance from the terminal:

$ ~/odoo-dev/odoo/odoo-bin -c my-instance.cfg#commad didn’t work yet !

chap 3 — p 93 :

cd ~/odoo-dev mkdir local-addons mkdir local-addons/my_library
  • Add a minimal module manifest for Odoo to detect it as an add-on module. Inside the my_library folder, create an __manifest__.py file with this line :
touch local-addons/my_library/__init__.py#add this to __manifest__.py{'name': 'My Library'}

.

odoo/odoo-bin --addons-path=odoo/addons/,local-addons/

Completing the add-on module manifest :

To create a manifest file with the most relevant keys, edit the module’s __manifest__.py file so that it looks like this:

cd ~/odoo-dev/local-addons/my_library
{
'name': "My library",
'summary': "Manage books easily",
'description': """
Manage Library
==============
Description related to library.
""",
'author': "MABT",
'website': "https://mabttech.medium.com/",
'category': 'Uncategorized',
'version': '13.0.1',
'depends': ['base'],
'data': ['views/views.xml'],
'demo': ['demo.xml'],
}
python3 odoo-bin -d odoo-test -i base --addons-path=addons

To create the __init__.py :

#touch __init__.py 

--

--