Odoo Help


When I click on purchase dashboard in reporting menu facing error

Akhilesh Gupta
on 8/11/15, 5:40 AM 1,172 views

I spent more than two day but can't diagnose this error.

2015-08-11 09:15:22,739 22332 ERROR uf_02aug openerp.sql_db: Programming error: relation "purchase_report" does not exist

LINE 1: ...rchase_report"."price_total") AS price_total FROM "purchase_...


, in query SELECT min(purchase_report.id) AS id, count(purchase_report.id) AS __count,"purchase_report"."category_id", sum("purchase_report"."price_total") AS price_total FROM "purchase_report" WHERE ("purchase_report"."state" in (%s,%s,%s,%s)) GROUP BY "purchase_report"."category_id"

2015-08-11 09:15:22,739 22332 ERROR uf_02aug openerp.osv.osv: Uncaught exception

Traceback (most recent call last):

File "/home/apagen/workspace/7/openerp7/openerp/osv/osv.py", line 132, in wrapper

return f(self, dbname, *args, **kwargs)

File "/home/apagen/workspace/7/openerp7/openerp/osv/osv.py", line 199, in execute

res = self.execute_cr(cr, uid, obj, method, *args, **kw)

File "/home/apagen/workspace/7/openerp7/openerp/osv/osv.py", line 187, in execute_cr

return getattr(object, method)(cr, uid, *args, **kw)

File "/home/apagen/workspace/7/openerp7/openerp/osv/orm.py", line 2689, in read_group

cr.execute('SELECT min(%s.id) AS id, count(%s.id) AS %s_count' % (self._table, self._table, group_count) + (flist and ',') + flist + ' FROM ' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params)

File "/home/apagen/workspace/7/openerp7/openerp/sql_db.py", line 161, in wrapper

return f(self, *args, **kwargs)

File "/home/apagen/workspace/7/openerp7/openerp/sql_db.py", line 226, in execute

res = self._obj.execute(query, params)

ProgrammingError: relation "purchase_report" does not exist

LINE 1: ...rchase_report"."price_total") AS price_total FROM "purchase_...



It's sad to hear that you invested 2 days in this problem. However, following could be a possible solution.

purchase_report is a view ( database view ) in PostgreSQL database. Somehow system is not able to find the reference for that view from database.

Earlier people face a similar problem over here,

So I think in order to solve this problem,

1. Remove purchase_report view from Pgadmin and restart your Odoo server and upgrade "Purchase" module. ( Just guessing, because 2nd way is not good for live instance. I know it very well !!!! )

2. If 1st will not solve your problem then do the uninstall of "Purchase" module and Reinstall it. 

I am sure your problem will be solved soon,

Emipro Technologies Pvt. Ltd. I did follow both solutions which you suggest me . But can't get success to resolve this issue. Kindly give some other solutions

Akhilesh Gupta
on 8/12/15, 2:06 AM

This problem can be difficult to guess without look into actual log. Still do one thing, fire queries to delete model "purchase.report" and it's fields from database. Restart your odoo and try to upgrade purchase module.

Emipro Technologies Pvt. Ltd.
on 8/12/15, 2:19 AM


Make sure you didn't miss the addons path. If addons path is there, make sure the purchase module files have enough access!


Everything is set proper in confg file and security access rights also taken right. I want to know what is mean of Programming error: relation "purchase_report" does not exist .

Akhilesh Gupta
on 8/11/15, 6:56 AM

Akki, it means, the postgres view called postgres_report does not get registered in DB and hence the client/ view does not find it.

Serpent Consulting Services Pvt. Ltd.
on 8/12/15, 2:02 AM

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.


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)


Asked: 8/11/15, 5:40 AM
Seen: 1172 times
Last updated: 8/11/15, 6:58 AM