odoo / docker

Other
948 stars 1.54k forks source link

update model views #165

Open lveras opened 6 years ago

lveras commented 6 years ago

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.

thomas15v commented 6 years ago

Hi @lveras

You can do the following:

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>

arturobgz commented 6 years ago

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

thomas15v commented 6 years ago

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.

slipnox commented 6 years ago

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.

thomas15v commented 6 years ago

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

slipnox commented 6 years ago

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.

thomas15v commented 6 years ago

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?

slipnox commented 6 years ago

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?

pakota159 commented 4 years ago

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.

lathama commented 4 months ago

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