← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 723355] Re: Postgres Views ProgrammingError more than one row returned subquery

 

*** This bug is a duplicate of bug 731035 ***
    https://bugs.launchpad.net/bugs/731035

** This bug is no longer a duplicate of bug 728042
   Sales Analysis bad query
** This bug has been marked a duplicate of bug 731035
   Reference UoM for category should be checked for uniqueness
 * You can subscribe to bug 731035 by following this link: https://bugs.launchpad.net/openobject-addons/+bug/731035/+subscribe

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/723355

Title:
  Postgres Views ProgrammingError more than one row returned subquery

Status in OpenERP Modules (addons):
  New

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



References