c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #18164
[Bug 728042] [NEW] Sales Analysis bad query
Public bug reported:
When you click on sales analysis, postgres log shows this query attempt
SELECT min(sale_report.id) AS id, count(sale_report.id) AS __count,sum("sale_report"."price_total") AS price_total, sum("sale_report"."nbr") AS nbr, sum("sale_report"."product_uom_qty") AS product_uom_qty, sum("sale_report"."shipped_qty_1") AS shipped_qty_1, sum("sale_report"."delay") AS delay FROM "sale_report"
This is the result,
File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2187, 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 "/usr/local/lib/python2.6/dist-packages/openerp-server/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
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
** Affects: openobject-addons
Importance: Undecided
Status: New
--
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/728042
Title:
Sales Analysis bad query
Status in OpenERP Modules (addons):
New
Bug description:
When you click on sales analysis, postgres log shows this query attempt
SELECT min(sale_report.id) AS id, count(sale_report.id) AS __count,sum("sale_report"."price_total") AS price_total, sum("sale_report"."nbr") AS nbr, sum("sale_report"."product_uom_qty") AS product_uom_qty, sum("sale_report"."shipped_qty_1") AS shipped_qty_1, sum("sale_report"."delay") AS delay FROM "sale_report"
This is the result,
File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 2187, 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 "/usr/local/lib/python2.6/dist-packages/openerp-server/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
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
Follow ups
References