Odoo Internal Server Error

Collection of all the Odoo errors, which I will find during the development, leading to the not nice Odoo Server Error or Frontend Errors.

Gioacchino Lonardo
3 min readJun 14, 2020
Odoo Internal Server Error

The operation cannot be completed

The operation cannot be completed:
- Create/update: a mandatory field is not set.
- Delete: another model requires the record being deleted. If possible, archive it instead.
Model: model name (my.model.name), Field: String destription of field (field name)

In this case the Odoo model my.model.name has a field, securely relational, named field name that refers to an Odoo model that you are about to delete.

No inverse field None found for ‘module name’

Odoo Server Error — Warning
No inverse field None found for ‘module name’

This happens when a One2many field has a bedside table that points to a model, in this example medium.story, that does not have its Many2one. For example:

KeyError

KeyError

Error that occurs when a variable is not found in Odoo. You’ve probably changed the name of a field to Odoo but you haven’t changed this name on all sides, such as in an api.depends.

Missing required value for the field ‘Object’ (model_id) in ir.model.access.csv

In this case the declared model:id was not found inside the ir.model.access.csv. Double-check the file carefully and verify that the safety rule has the right external id.

Field `author_ids` does not exist

In this case there is a field in the form view that is not found in the respective medium.story model. Note medium_story.xml:16. In fact, the error is in the sixteenth line starting with <record id=”medium_story_view_form” model=”ir.ui.view”>.

External ID not found in the system

In this case the external id library_base_menu does not exist. So find the correct parent menuitem.

No module named ‘werkzeug.contrib’

pip3 unistall Werkzeug (will uninstall earlier version)pip3 install Werkzeug==0.11.15 (check the requirements.txt and installed that version)

To fix this error see in the requirements file the version your version of odoo requires. This error can happen if you do not use a virtual environmnet, so it is always good practice to create it.

psycopg2.ProgrammingError: can’t adapt type ‘method’

This error happens when we try to give a method the same name as a Odoo field. For example:

Odoo Frontend Error

In odoo there are rarely any frontend errors, since the frontend code is generated by the views that are written in XML. But sometimes it is possible that there are errors due to the fact that Odoo doesn’t notice backend errors and they propagate as frontend errors. Obviously if you write custom frontend code it is possible that they are not written correctly.

Uncaught TypeError: Cannot read property ‘length’ of undefined

TypeError is a Javascript error which means that you are applying length to an object that you didn’t expect. Typically the error lies in the views. For example, there might be the use of the wrong widget, to make a case a widget=”many2many_tags” is assigned to a One2Many field.

Some I create them on purpose, others are real development errors :D. I’ll add them every time I find new ones, so follow me!

--

--

Gioacchino Lonardo

Computer Engineer, AI enthusiast, biker, guitar&bass player