Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
7687 Näkymät

Hello everyone,

Here is my problem, I want to do my Odoo module developments on VScode in order to take advantage of all the advantages, in particular Python extensions

All the environments I work on are odoo.sh bases.

After having done an Odoo experience last year and having been able to discuss with the developers on site, I was told that they do everything "locally" so I suppose via the installation of a local Odoo of PostgreSql etc.. .


However, I'm having trouble understanding the necessary configuration, i.e.:

  • How to manage configuration files
    • Several SH bases, on different versions (v14 -> v16)
    • Several githubs

  • Is DL required for each Odoo version needed for each odoo.sh database?
    • Or is there an easy way to version swap

  • How to have identical customer data to do our tests ?
    • After some research, it is impossible to make a remote connection to a P-SQL database if it is on odoo.sh, apparently for security reasons
    • I assume you have to upload a local backup?

I also tried an SSH connection (like the SH editor I guess) via Remote SSH from VScode but the connection drops easily and we waste more time waiting for the loads than doing development

Is there any documentation that shows how to setup this set ? or, can I have information on the setup of such an environment

It is possible that I am vague on certain points, do not hesitate to ask me questions.

Thanks in advance,

Avatar
Hylkää
Paras vastaus

Yes It is possible, Setting up an Odoo development environment with VS Code and GitHub can be a bit complex, but it can be done by following a few steps.

Install Odoo Locally:
To work on Odoo modules locally, you will need to install Odoo on your machine. You can download the installation package from the Odoo website or use Docker to set up a container with Odoo installed.

Connect to Odoo.sh:
After installing Odoo, you will need to connect to your Odoo.sh databases. You can do this by configuring the odoo.conf file with the credentials for your Odoo.sh databases. This file is usually located in the Odoo installation directory.

Use Git to Manage Your Code:
To keep track of your code changes, you can use Git to manage your code. You can create a repository on GitHub and clone it to your local machine. Then you can use VS Code to edit your code, commit changes, and push them to GitHub.

Use the Same Data for Testing:
To test your modules, you can use the same data that you have in your Odoo.sh databases. You can use the backup and restore tools in Odoo to create a backup of your Odoo.sh database and restore it on your local machine. This way, you can work with the same data that you have on your Odoo.sh databases.

Versioning:
If you need to work with different versions of Odoo, you will need to install each version separately on your local machine. You can use virtual environments to keep each version separate and avoid conflicts between them.

Use Odoo VSCode Extension:
To enhance your development experience, you can install the Odoo VSCode extension. This extension provides code snippets, syntax highlighting, and debugging tools to make your development process easier.

Use DevContainer:
Another option is to use the DevContainer feature of VS Code, which allows you to develop in a containerized environment. You can configure a container with all the necessary dependencies and tools, and use it to develop your modules.

There are several resources available online to help you set up this environment, including the Odoo documentation, blogs, and forums. You can also find tutorials and videos that guide you through the process.

Avatar
Hylkää

Can you give an example of how Odoo.sh database is configured in odoo.conf? Thanks

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
maalisk. 25
6193
1
maalisk. 25
1115
0
toukok. 25
2398
1
elok. 23
1969
0
marrask. 21
3016