Is there a way to pycharm-odoo work with Docker?
sel-carlitos opened this issue · comments
Hi,
I am trying to get this working with Docker. Or should the source code be downloaded in order to make it work?
Here is my docker-compose.yml file:
version: '3.8'
services:
db:
image: postgres:latest
volumes:
- db-data:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432/tcp
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
- POSTGRES_DB=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
pgadmin:
image: dpage/pgadmin4:latest
volumes:
- pgadmin-data:/var/lib/pgadmin
ports:
- 8080:80/tcp
environment:
- PGADMIN_DEFAULT_EMAIL=odoo
- PGADMIN_DEFAULT_PASSWORD=odoo
- PGADMIN_LISTEN_PORT=80
web:
image: odoo:latest
depends_on:
- db
ports:
- "8069:8069/tcp"
volumes:
- web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
volumes:
db-data:
driver: local
pgadmin-data:
driver: local
web-data:
driver: local
Yes. It should work. If you use the Odoo source code as a python library instead of a project content root, then please try the new version 3.9 (https://github.com/trinhanhngoc/pycharm-odoo/releases/tag/v3.9) that supports that workflow.
You mean as a content root? Like so:
Or by adding Odoo's source code to the interpreter's paths? Like so:
In any case, I wonder how to keep the Odoo Python library in-synch with the container's Odoo's installed source. I wonder if doing a git pull and recreating the container is sufficient?
Will you be updating Jetbrains marketplace to show 3.9? 3.8 is the latest one. If not I will install manually.
- Yes, that's what i mean. I persionally prefer to use a content root because i usually need to open odoo source code for reference.
-
For docker, I think odoo docker images are updated regularly, so you just need to update the image and recreate the container.
-
The new version 3.9 has been ready on Jetbrains Marketplace.
I can't get it to work as in your youtube video: https://www.youtube.com/watch?v=SMqepH2A4_4
What I mean is when I want to do the inherit = 'acc...' it should show all the models for account and the like. But it doesn't. It seems it's not going into odoo/addons but only considering odoo/odoo folder.
Here is the project setup:
In this last screenshot it should show all the acc... models, etc...
Have you declared the module account
as a depend in the manifest of the module carlitos_module
?
Sorry! I had just scaffold the module again and didn't do that!!! Works beautifully just as in the video!!! Thanks for your help and great work!!!