Skip to content
Advertisement

Can’t install own custom modules in Odoo 13

During the last two days I have been trying to install a custom module in Odoo 13. I got the same error over and over again, telling that a column didn’t exist in the model that I was creating (the variable in the class did, indeed, exist), I show the error down below.

The python code of the module is the following:

JavaScript

And the error I get:

JavaScript

After some trial and error, I tried to install a default module that is created with odoo-bin scaffold, and what was my surprise when I cound’t install it neither.

The error I get when installing the default module is a collision with other tables of odoo packages, since I am in a test environment I tried removing those packages and, when trying to reinstall, the same error arose but with a different package. I can’t figure out why this happens because, a priori, my package only depends on ‘base’.

The code of the default module created with scaffold:

JavaScript

The error I get:

JavaScript

However, the table borrar_borrar does get created:

link to image showing table in pgadmin4

This only happens with modules created by me, I have downloaded several modules from github and the official Odoo store and all of them install flawlessly.

Note: for ease of maintenance I have the modules in a git repository and I have soft-linked them to the custom-addons folder in the odoo directory. I have also tried placing them directly in the directory and the errors are the same.

Advertisement

Answer

I found out the solution. I’m writing it here in case someone face the same problem in the future.

The issue was that I had a Foreign Data Wrapper (FDW) to read data from another database and, for some reason, it was causing some kind of interference with the database I was working on. When I removed the FDW, everything worked as expected.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement