Postgres Views ProgrammingError more than one row returned subquery

Bug #723355 reported by Kyle Waid
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

In a sample database you would not notice this issue.

Please issue the following query:
SELECT category_id, COUNT(name) FROM product_uom WHERE uom_type='reference'
GROUP BY category_id; -- HAVING count(name) > 1

If it has any row where count(name) > 1, it will return this error
File "/usr/local/lib/python2.6/dist-packages/openerp-server/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
ProgrammingError: more than one row returned by a subquery used as an expression

To bypass the issue do this
It is in addons/account/report/account_invoice_report.py:92, where a "LIMIT 1"

There is another view with a similar problem in the GTK Client warehouse views

Revision history for this message
Kyle Waid (midwest) wrote :

Actually not the warehouse view, but Purchase > Purchase Analysis

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.