Bug in the tree view of the projects, when grouping by parent

Bug #697445 reported by Open Net Sàrl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Consider a hierarchical list of projects, with parent-child relation.
Try to group by "Parent" and you'll get an error such as:

Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : fr_CH.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.0-rc2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  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 598, 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 2182, 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 76, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/sql_db.py", line 129, in execute
    res = self._obj.execute(query, params)
ProgrammingError: ERREUR: la référence à la colonne « parent_id » est ambigu
LIGNE 1 : ... id, count(project_project.id) AS parent_id_count,parent_id,...
                                                               ^

I think there is an error while constructing the query while grouping by parent: the colun 'parent_id' may be related to more than one table

Grouping by "Partner" and/or by "Manager" is okay.

Best regards

Revision history for this message
Open Net Sàrl (openerp-open-net) wrote :

In case it's not clear: both server and client are V6.0.0 RC2

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.