Skip to Content
Menu
This question has been flagged
3 Replies
4791 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_...

Avatar
Discard
Best Answer

Akki,

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,


Avatar
Discard
Author

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

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.

Best Answer

Akki,

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

Thanks.

Avatar
Discard
Author

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 .

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