docker icon indicating copy to clipboard operation
docker copied to clipboard

update model views

Open lveras opened this issue 7 years ago • 10 comments

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.

lveras avatar Jan 23 '18 11:01 lveras

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 avatar Jan 25 '18 13:01 thomas15v

@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?

arturobgz avatar May 17 '18 17:05 arturobgz

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.

thomas15v avatar May 23 '18 08:05 thomas15v

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.

slipnox avatar Jul 25 '18 22:07 slipnox

Add --no-http or --no-xmlrpc.

thomas15v avatar Jul 26 '18 04:07 thomas15v

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.

slipnox avatar Jul 27 '18 05:07 slipnox

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?

thomas15v avatar Jul 27 '18 07:07 thomas15v

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.

odoo_fail

Hiya guys, no idea what is happening here?

slipnox avatar Jul 28 '18 06:07 slipnox

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.

pakota159 avatar Feb 26 '20 08:02 pakota159

@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.

lathama avatar Apr 10 '24 15:04 lathama