Odoo Help

0

Weird Error: ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"."id...

By
Abdullah Sofan
on 1/25/15, 10:59 PM 5,845 views

When I make many2one field to one of the base modules (like, account.invoice or hr.employee), sometimes it works fine but other times I get this weird Error:

 

ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"."id...

This only gets resolved when I completely restart the system (the windows machine). Does anyone know what could be leading to this?

Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 518, in _handle_exception File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 539, in dispatch File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 295, in _call_function File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\service\model.py", line 113, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 292, in checked_call File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 755, in __call__ File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\http.py", line 388, in response_wrap File "C:\Program Files (x86)\Odoo 8.0-20141221\server\openerp\addons\web\controllers\main.py", line 949, in call_kw File "C:\Program Files (x86)\Odoo 8.0-20141221\server\openerp\addons\web\controllers\main.py", line 941, in _call_kw File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\api.py", line 237, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\api.py", line 332, in old_api File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\models.py", line 1734, in name_search File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\api.py", line 235, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\api.py", line 464, in new_api File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\models.py", line 1746, in _name_search File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\api.py", line 237, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\models.py", line 4587, in _search File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\sql_db.py", line 158, in wrapper File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\sql_db.py", line 234, in execute ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"."id...

0
Abdullah Sofan
On 1/25/15, 11:15 PM

After digging a little deeper into this problem, it seems only to happen when I use the "Upgrade" button to updgrade my module.

The way to resolve it is by restarting both the "Odoo" service and also the "postgres" service 

2
Denis Roussel
On 2/2/15, 4:19 AM

Abdullah,

Please look at your dependencies in your __openerp__.py.

I've just have the problem : I forgot to mention the depending modules for every relation I have in my own module

Hope this helps

1
Aristóbulo Meneses
On 2/18/15, 6:25 AM

This problem occurs when you declare a Many2one field passing arguments in the wrong order to the constructor.

For example:

account_id = fields.Many2one('Account', 'account.account', required=True)  [WRONG]

instead of:

account_id = fields.Many2one('account.account''Account', required=True) [CORRECT]

You don't get an exception, but relation is not properly created.

0

Hi,

this post may be a bit old, but was struggling in same issue for few... hours.

In my case, it was a 'small' typo in the Many2one reference object.


Hope this may save some time to others in same situations.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/25/15, 10:59 PM
Seen: 5845 times
Last updated: 2/10/17, 5:51 PM