Odoo Help

Welcome!

This community 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.

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,202 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

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/25/15, 10:59 PM
Seen: 5202 times
Last updated: 3/16/15, 8:10 AM