1
votes

I am working with Odoo 10.0 (python). Each time there are errors in my source XML or python, this situation always exists :enter image description here

I found a solution on Odoo official page :enter image description here (https://www.odoo.com/forum/help-1/question/internal-server-error-the-server-encountered-an-internal-error-and-was-unable-to-complete-your-request-either-the-server-is-ov-55081) It works, but this solution is not good, because I always have to delete my error module in "addons". It takes a lot of time and effort.

So I am looking forward to an easier solution. Thanks a lot for your help

4
How are you restarting your Odoo server? Please post the command line code you use to restart the server as well. - Abu Uzayr

4 Answers

0
votes

Odoo will produce a much better error message with stacktrace in its log. You should use it, to fix your xml problems.

Usually you will get xml errors while updating (custom) modules. So if you have access to the database for example with psql, just use following query:

UPDATE ir_module_module SET state='installed' WHERE state='to upgrade'

If the module wasn't installed yet:

UPDATE ir_module_module SET state='uninstalled' WHERE state='to upgrade'
0
votes

Let's say you upgraded your module and you're faced with an internal server error. You find where your mistake is but you can't access the screen where you're supposed to update the module again.

First, I think that if the error occured during update, the update would not have finished. So if you restart your server, the update will run back again and your problem will be solved.

If your module is not automatically updated this way, just restart the server while updating your module like so ./odoo-bin -u your_module.

0
votes

If you are using ./odoo-bin to start/stop your server, then the command line will actually warn you of your error before you have to go to the browser to get the Internal Server Error notice.

It looks something like this:

odoo-bin

When there is an error in your Odoo application, it will look like this:

odoo-bin with error

After the Error, there will be Traceback (most recent call last): and what follows will be the traceback leading to the error, or what happened leading to the error.

The last line of the traceback is the error message, which in this case reads: AssertionError: The report...already exists.. You can search the specific error on Google or StackOverflow to get some possible solutions to the error.

But to answer your question, what you can do after getting this error will be to hit CTRL+C twice to kill the server. Make the required changes to your module then restart the module with the -d database flag and -u flag to update your module.

So the full command would look like:

./odoo-bin -d database_name -u module_name_1,module_name_2

Wait a while for the server to start, then if you don't get an error you can then go to your browser to load your Odoo instance.

-1
votes

Actually, this error existed because of errors in my XML or py files so I must fix them in that files and then restart the server odoo in "service". The problem is totally resolved. Thanks