In this article, you will learn how to run the Odoo service by just double-clicking (executable) on the Icon. Normally we use the command line or terminal to run an instance of Odoo on the server or our local system.
How to Run Odoo Service by just double-clicking on an Icon
To run the Odoo service just like a .exe file, you need two scripts. The one is to run the service for Odoo, and the other is to hide the command line (that run's the Odoo service).
Below are the steps to run the Odoo service as an exe file.
- Create a file with extension .bat (you can give it any name)
- Paste the below code into the above-created file
Note: If you are using an older version of Odoo like Odoo8 then you have to set the path below
@ECHO OFF
start http://localhost:8069
python D:\odoo\odoo.py
If you are using the latest version of Odoo like Odoo14 or Odoo15 then you have to set the file path like below
@ECHO OFF
start http://localhost:8069
python D:\odoo15/odoo-bin -c D:\odoo15\debian\odoo.conf
The above batch file will just run the Odoo service by opening a command-line window and opening localhost in your default web browser. If you want to close that command line and run the batch file script in the background then you have to follow the below steps.
- Create a file with extension .vbs (you can give it any name)
- Pate the below code in the above file
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "path of you bat file which you have created in above steps\run_software.bat" & Chr(34), 0, True
Set WshShell = Nothing
Now, whenever you will double click on that file, the localhost of Odoo will be open, and the Odoo service will be run in the background.
0 Comments