docker
docker copied to clipboard
update model views
Hi,
I create a model and need update views. When I start odoo with parameters "-d database -u module", my module update.
How do I update module with command line on this docker?
sorry my english.
Hi @lveras
You can do the following:
- With docker:
docker exec -it <container_name> odoo -d database -u module --db_host db --db_password odoo - With docker-compose:
docker-compose exec <container_name> odoo -d database -u module --db_host db --db_password odoo
EDIT:
Update and exit after:
docker-compose exec odoo odoo -d <database>--db_password odoo --db_host db --no-xmlrpc --stop-after-init --update <modules>
@thomas15v You can only use "exec" when the container is running, if you use that command, you will have 2 instances of Odoo. I will have problems with that situation? For example, the database can be corrupted?
I have been using the following commands for a year almost. I never had a corrupted database. Also having 2 instances of odoo running on the same database shouldn't be an issue. As far as I know odoo will lock tables so another instance has to wait for completion.
Hi there guys, I am having a hard time trying to update a module from the command line... actually I am running docker 18.06.0-ce and compose 1.22.0, everytime I run docker-compose exec odoo11 odoo -d test -u module_name --db_host db --db_password odoo I get: Exception in thread odoo.service.httpd ........ OSError: [Errno 98] Address already in use.
Thanks for any help.
Add --no-http or --no-xmlrpc.
Hi, no luck with those parameters :( or maybe I am executing in the wrong way I am using the parameter as last arguments like:
docker-compose exec odoo11 odoo -d test -u module_name --db_host db --db_password odoo --no-http
This time it seems that the execution can't be resolved.
Thanks in advance.
I don't think command order matters. I just tried your command and it works fine. What do you mean with:
This time it seems that the execution can't be resolved.
Would it be possible to give me the exact error?
Does not bring any errors or results, when I hit enter to execute does not do anything I have to make a Ctrl + C to exit the state :(
It seems like the command hangs and stay forever holding.

Hiya guys, no idea what is happening here?
Hi, I don't know if any of you still got the problem anymore but I faced the same issue.
After checking the log, I figure out the problem is odoo failed to connect to the database and then return the 502 Bad request error which frozens your command like above.
Solution: you should run docker inspect <your db container> to review your database config like name, host, etc, or check the config in your docker-compose then change the params you pass in your command.
the flag --no-http and --stop-after-init just prevent you exit without error after update module.
@lveras I just wrote this in another issue so hope it helps
docker run -it <volumes and stuffs> odoo -- --update mymodule
I see this is an old issue, if you do not need it please close.