← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 697443] Re: Bug in the tree view of the projects, when grouping by parent

 

** Changed in: openobject-addons
    Milestone: None => 6.0

-- 
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/697443

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

Status in OpenObject Addons Modules:
  Fix Released

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





References