"Install Odoo 17 on Windows & Configure with Visual Studio Code - A Step-by-Step Guide"
HTML-код
- Опубликовано: 29 окт 2024
- 🚀 Welcome to Your Odoo 17 Journey on Windows! 🚀
In this comprehensive tutorial, we delve into the world of Odoo 17, the latest and most dynamic version of the renowned all-in-one management software. Whether you are a business owner, a developer, or an enthusiast in enterprise resource planning (ERP), this video is your gateway to mastering Odoo 17 on a Windows platform.
What You Will Learn:
Odoo 17 Installation: Discover the ins and outs of installing Odoo 17 on a Windows environment. Our easy-to-follow steps ensure a smooth and hassle-free installation process.
Visual Studio Code Configuration: Learn how to configure Visual Studio Code for an optimized Odoo development experience. We cover everything from setting up your development environment to fine-tuning it for Odoo's unique framework.
Odoo_conf File: code: github.com/odo...
Meet Odoo 17: www.odoo.com/b...
Visual Studio Code Download Link: code.visualstu...
Odoo17 Download Link: www.odoo.com/p...
The instructions, approach, details and comments are very much commendable. Also, responses to questions in the comments section was very helpful for those having similar issues. Thanks!
Thank you very much! i really appreciate your kind comment. bless
This tutorial video will guide you on how to install Odoo 17 on Windows and configure & run it with Visual Studio Code which is very helpful. It's cool!
Thanks for sharing. Keep going well, mate!
I'm glad you found the tutorial on installing Odoo 17 on Windows and configuring it with Visual Studio Code helpful! If you have any more questions or need further assistance as you dive into your Odoo projects, feel free to reach out.
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: role "openpg" does not exist
I got this error message after going through the installation. I access my Odoo localhost page but missing the database.
Can you make a video on this?
sure i will do that but please also check that openpg user exist if not either create one or pass already existing one
This is an excellent tutorial. Thank you.
Glad it was helpful!
Thank You, Sir! for explaining everything so clearly. Your insights were incredibly helpful!
thanks so much, it really means a lot . bless
Hi, I hope you are doing well.
I am not able to generate the launch.json file. I am using Odoo 17, VS Code 1.86.1, and Python 3.11.8. When I click on Run -> Add configuration, it shows me Python debugger -> Python file. However, clicking on it does nothing
open visual studio in as administrator.
Sorry for late reply i was actually away for some days.
Manually Creating launch.json for Odoo
Open Your Project in VS Code: Make sure your Odoo project folder is open in VS Code.
Access the .vscode Folder:
Navigate to the .vscode folder at the root of your project in the Explorer pane. If it doesn't exist, you'll need to create it.
Inside the .vscode folder, look for a launch.json file. If it doesn't exist, create it by right-clicking in the Explorer pane, selecting "New File", and naming it launch.json.
Edit launch.json:
Open launch.json and add the necessary configuration for running Odoo. i have added the json code so you can copy and paste it in here
Very good tutorial for setup Odoo 17
thanks so much it means a lot.
There is not a localhost in my pgadmin, there is just the PostgreSQL 12
I had the same issue! No localhost database, only PostgreSQL 12
can you please give me more details thanks
faced same issue
you can create the openpg database with it's password which is openpgpwd it will work
The Python Path in your configuration file is invalid. I tried to re-install an older version of visual studio code (1.74) and Python extension (v2022.20.2) but still having the same error message. Can you help please?
hi, if you go in your json file you will see a "python": after that theres python path so because the conf file i have provided its generic so you need to adjust your python path , where python has been installed in your machine
Database creation error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "openpg"
same here
when you installed PostgreSQL it asked you for username and password which normally username: openpg and password is openpgpwd and same information is in launch.json vscode file like this "--db_user",
"openpg",
"--db_password",
"openpgpwd", you need to check what username and password you have for your user in postgresql and then update in here accordingly otherwise create a new user with username and password and update in here accordingly. i hope it answers your question. thanks
My module is present in apps section but it is not displaying in discuss section. I have also checked developers mode, restarted odoo and watched tutorials but it did not helped me. Could you please help to fix it?
so sorry for late reply i was bit away. have you resolved this?
When I press run it loads for a second and then stops - no output to any terminals. Any idea what could cause this?
Ensure that the odoo.conf file is correctly configured and points to the correct database, addons path, and other necessary options.Verify that the PostgreSQL server is running and accessible. Check the db_host, db_port, db_user, and db_password in your odoo.conf file.
I have completed all the steps and getting no issue at all in the terminal but when i try to access localhost:8069 its give me internal server error
There are no lags in terminal its working perfectly fine
Can you please help me out with this??
have you checked if your conf file contains the right port?
So I get that i am logged in successfully in terminal in login page but the login page UI is still in login page and continuously loading not proceeding forward any help?
The first step is to check the Odoo server logs for any errors or warnings that might indicate what the problem is. You can find the logs in the terminal where you started the Odoo server. Look for any tracebacks or error messages. Ensure all dependencies are installed correctly. You can install the required dependencies using pip:
how can i extract the demo data from this odoo after the installation please!
1. At Installation Time
The easiest way to avoid demo data is by not installing it in the first place. When you create a new database through Odoo's database manager interface, you can uncheck the "Load demonstration data" option. This prevents the demo data from being loaded.
2. Resetting the Database
If the demo data is already loaded, and you're okay with starting from scratch, the most straightforward approach is to reset your database. Be cautious with this approach as it will remove all data, not just demo data.
Via Odoo Database Manager:
Go to the Odoo database management page (usually yourOdooDomain/web/database/selector).
Create a new database without demo data, and optionally delete the old one. Ensure you do not select the option to load demo data for the new database.
Via Command Line (for advanced users):
Connect to your PostgreSQL database using command line tools like psql.
Drop the database with demo data and create a new one. For example:
shell
Copy code
dropdb old_database_name
createdb new_database_name
Restart your Odoo instance and configure it to use the new database.
3. Using Odoo Shell
For more advanced users, you can use Odoo's shell to programmatically remove demo data. This requires custom scripts and a good understanding of Odoo's models. This method is not straightforward and can be risky if you're not familiar with Odoo's data structure.
4. Module Uninstallation
Sometimes, uninstalling and then reinstalling specific modules (without including demo data during the reinstallation) can remove portions of the demo data. This method is not guaranteed to remove all demo data and is generally not recommended because it can lead to inconsistent data states.
I saved the odoo17 file on my desktop but it’s saying the python path is incorrect
in your json file , please update your python path
The AI images are so funny. Keep up the good work, thanks for your help!
thank you so much
Hi this is very helpfull and i follow all the steps but when I try to run using option "Run -> run without debugging" get the error "the python path in your configuration is invalid" could you please help to fix this issue
issue roselved
@@ZeeForZahid how did you solve it? having same problem. many thx
please adjust / correct your python path in your json file , because python path i wrote in there according to my machine's python isntalled version so please adjust it.
thanks you. you can create clip about update odoo 17 on win 11 to odoo 18. thanks so much.
sure i will add soon, thanks
@@odooistic thanks
is there a way to have an auto-update to my custom-modules
plz help me
yes you can add an extra argument in json file, lets suppose if your custom module's name is custom_module then you can write "-u", "custom_module", then whenever you will restart odoo service , your custom module will also be auto upgraded.
is it possible to develop modules using odoo17 packaged installer ?
Yes, it is possible to develop modules using Odoo 17 installed via the packaged installer. The packaged installer, typically used for Windows or deb-based installations (like Ubuntu), provides a convenient way to get Odoo up and running for users who prefer not to deal with Python package managers or virtual environments directly.
hello I faced this error " Database creation error: permission denied to create database" how can I solve it?
Ensure that the PostgreSQL user you are using has the necessary permissions to create a database. This can be done through the PostgreSQL command line or a GUI tool like pgAdmin.
Thank you very much
You are welcome
My problem in odoo is "Database creation error: Access Denied" help me pls
you need to match username and password of your postgres user with launch.json file username and password . please look into this, or create a new user and then pass details in launch.json file. hope it will work
same problem how can solve it and i make the above solution @@odooistic
@@odooistic There are no username and password fields in the launch.json file you provided
@@shaheerasrar3972 hi, we dont put db username and password in json file, hence we do it in odoo.conf file. here is my odoo.conf file sample. [options]
addons_path = c:\odoo17\server\odoo\addons, c:\odoo17\server\custom
admin_passwd = $pbkdf2-sha512$25000$nNM6Z8z535uTUgqhVEpp7Q$q5a1W.d5xlm6kNEOBAWJOk6ZlFZD3FOKeVXAiXs806hNxM0EwDArsLEyO.5GRUTQlvRtJhccQAcNyuyNpPRzvQ
bin_path = C:\odoo17\thirdparty
csv_internal_sep = ,
data_dir = C:\odoo17\sessions
db_host = localhost
db_maxconn = 64
db_maxconn_gevent = False
db_name = False
db_password = openpgpwd
db_port = 5432
# db_sslmode = prefer
db_template = template0
db_user = openpg
dbfilter =
# default_productivity_apps = True
# demo = {}
# email_from = False
# from_filter = False
# geoip_city_db = c:\usr\share\geoip\geolite2-city.mmdb
# geoip_country_db = c:\usr\share\geoip\geolite2-country.mmdb
# gevent_port = 8072
# http_enable = True
# http_interface =
http_port = 8001
import_partial =
limit_memory_hard = None
limit_memory_soft = None
limit_request = None
limit_time_cpu = None
limit_time_real = None
limit_time_real_cron = None
list_db = True
# log_db = False
# log_db_level = warning
# log_handler = :INFO
# log_level = info
max_cron_threads = 2
osv_memory_count_limit = 0
pg_path =
pidfile =
proxy_mode = False
reportgz = False
screencasts =
# screenshots = c:\users\faroo\appdata\local\temp\odoo_tests
# server_wide_modules = base,web
# smtp_password = False
# smtp_port = 25
# smtp_server = localhost
# smtp_ssl = False
# smtp_ssl_certificate_filename = False
# smtp_ssl_private_key_filename = False
# smtp_user = False
# logfile = C:\odoo17\server\odoo.log
# syslog = False
# test_enable = False
test_file =
test_tags = None
transient_age_limit = 1.0
# translate_modules = ['all']
# unaccent = False
# upgrade_path =
# websocket_keep_alive_timeout = 3600
# websocket_rate_limit_burst = 10
# websocket_rate_limit_delay = 0.2
# without_demo = False
# workers = None
# x_sendfile = False
Heyy same issue here please help!
hello I did what you did but localhost odoo page did not open I could not find the reason can you help me thank you
sorry for late reply, i was away for some days, have you resolved issue?
Hello, when I try to run the odoo.conf file it says 'Code language not supported or defined.' Can you help me
The message "Code language not supported or defined" typically indicates that Visual Studio Code doesn't recognize the file type or doesn't have the necessary extension to handle it. The odoo.conf file is a configuration file, usually in INI format, for Odoo settings.
Make sure you have the Python installed properly on lower right hand side you must see a python version if you cant see it then you need to install it first or install a python extension to see odoo.conf file.
@@odooistic I had everything configured and installed in vsc as I was using it for others project. I ran the file with my configuration not yours. Perhaps that's the problem ? And I have another problem, in the logs I see 'connection to the database has failed' multiple times. I don't see localhost aswell in pgadmin.
@@odooistic After putting the same launch.json file than you, it still doesn't support the code language
unable to generate launch.json file using python debugger
Variable {file} can not be resolved. Please open an editor
hi, you can manully create a launch.json file aswell and copy the script from description.
thank you for sharing. this is very helpful and complete tutorial. but i have some trouble in gpadmin4, there is no "localhost" server in "servers" it also keep prompt asking for postgresql 12 password, which i try to fill opengpwd its incorrect.
It sounds like you're facing a couple of issues with pgAdmin 4 after following a tutorial, specifically regarding server connections and password authentication. Here are a few steps to help you troubleshoot and resolve these issues:
Server Not Showing in pgAdmin 4:
Ensure that PostgreSQL is properly installed and running on your machine. You can check this by using the command line or services panel (on Windows, type services.msc in Run and look for PostgreSQL service).
If PostgreSQL is running and still not appearing in pgAdmin, you might need to manually create a new server connection. In pgAdmin, right-click on 'Servers', choose 'Create', and then 'Server'. Enter the necessary connection details:
Name: Localhost (or any name you prefer)
Host: localhost
Port: Typically, PostgreSQL runs on port 5432. Ensure this is the port number unless you've changed it during installation.
Username: postgres (default superuser, unless you've changed this)
Password: Enter the password you set during installation.
Password Issues:
The error with the PostgreSQL password ("opengpwd" incorrect) suggests there might be a misremembered or mistyped password. If you are sure of the password and it still doesn't work, consider resetting it:
Access your PostgreSQL installation via the command line.
You can reset the password by connecting to PostgreSQL with the command line tool and issuing a password change command:
sql
Copy code
ALTER USER postgres PASSWORD 'newpassword';
Replace 'newpassword' with your new password. Make sure PostgreSQL service is running when you do this.
After changing the password, update the password in pgAdmin when connecting to the server.
amazing video thanks so much
Glad you enjoyed it!
Odoo logs are not visible in Win10.
Please suggest
Edit: You need to comment the logs line in odoo config.
After that logs will appear in the terminal.
Okhay go in services and search for Odoo 17 then right click and stop Odoo 17 services then close services and then again restart Odoo and I hope this will be resolved and you will be able to see your logs in your terminal. Thanks
Kindly tell is this setup for Enterprise Or Community editions??
hello, while the tutorial showcases the Community edition, users with access to Enterprise addons can follow the same steps and adjust the configuration file accordingly to set up the Enterprise edition of Odoo. so first you need to download source enterprise addons and then just give path in conf file. thx
The file of configuration doesn't appear in vs code
you can create a newone then, after creating name it to launch.json
Muchas gracias me ayudo...
De nada y gracias por apoyar
Loved The Video. Could you do one on docker and guide on the Json file Setup
sure i will do it soon and will notify you
i can`t find my odoo.conf file
so sorry, was away for some weeks, have you resolved the issue? sorry again
your the best bro thank you
Any time, Glad i could help you
i need install python?
yes you need to install
Please add how to add python if not installed
official Python website (python.org) to download the Python installer. It's important to download it from the official site to ensure it's secure and up-to-date. onve you donload then just give that path in your launch.json file like this "python": "C:\\odoo17\\python\\python.exe",
Video is good but "Chup sound every 15 seconds is extra annoying" why didn't is removed during editing.
thanks for your feedback and i will certainly make sure it won;t be the case in future videos
i cant find localhost
Check Odoo Server Status: Make sure that the Odoo server is running. You can usually start it from the command line by navigating to the Odoo directory and running:
python odoo-bin -c odoo.conf
Replace odoo.conf with the actual configuration file you’re using.
Check Port Number: By default, Odoo runs on port 8069. So, you should access it via localhost:8069. If you've configured it to run on a different port, make sure to use that port in the URL.
Thank you for the tutorial. I have tried to configure the lauch.json as per the video. {
"version": "0.2.0",
"configurations": [{
"name": "Python: Odoo17",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "D:\\Program Files\\Odoo 17.0.20240305\\python\\python.exe",
"console": "integratedTerminal",
"program": "${workspaceRoot}\\odoo-bin",
"args": [
"--config=${workspaceRoot}\\odoo-conf",
],
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env"
"debugOptions":[
"RedirectOutput"
]
}
]
}
It shows error on "type": "python",
"debugOptions":[
appreciate if you could kindly advise. Thank you
please look at this {
"version": "0.2.0",
"configurations": [
{
"name": "Python: Odoo17",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "D:\\Program Files\\Odoo 17.0.20240305\\python\\python.exe",
"console": "integratedTerminal",
"program": "${workspaceRoot}\\odoo-bin",
"args": [
"--config=${workspaceRoot}\\odoo.conf"
],
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}\\.env",
"justMyCode": true
}
]
}
and replace with your python path