← Back to team overview

openerp-india team mailing list archive

[Bug 1287066] [NEW] [saas-3/trunk]Event: Server error on Events Analysis when having more then 10 events

 

Public bug reported:

Scenario:
1/ Create 11 events if necessary, we need to have 10 events or more. (no registrations needed)
2/ Go to Reporting -> Event Analysis
3/ The error "OpenERP Server Error" is shown twice and no data is displayed in the graph.

We have the same problem in Dashboard/Events

This is the complete error:
Traceback (most recent call last):
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 363, in dispatch
    response["result"] = self._call_function(**self.params)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 220, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 215, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 560, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 267, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/addons/web/controllers/main.py", line 1205, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/addons/web/controllers/main.py", line 1197, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/osv/orm.py", line 2371, in read_group
    d['__domain'] = [(groupby, '=', alldata[d['id']][groupby] or False)] + domain
KeyError: 'event_type'

The origin of the error seem to come from the file "report_event_registration.py" in the module Event: 
            SELECT
                e.id::char || '/' || coalesce(r.id::char,'') AS id,
                e.id AS event_id,
                e.user_id AS user_id,
                r.user_id AS user_id_registration,
                r.name AS name_registration,
                e.company_id AS company_id,
                e.date_begin AS event_date,
                count(e.id) AS nbevent,
                CASE WHEN r.state IN ('draft') THEN r.nb_register ELSE 0 END AS draft_state,
                CASE WHEN r.state IN ('open','done') THEN r.nb_register ELSE 0 END AS confirm_state,
                e.type AS event_type,
                e.seats_max AS seats_max,
                e.state AS event_state,
                r.state AS registration_state
            FROM
                event_event e
                LEFT JOIN event_registration r ON (e.id=r.event_id)
            GROUP BY
                event_id,
                user_id_registration,
                r.id,
                registration_state,
                r.nb_register,
                event_type,
                e.id,
                e.date_begin,
                e.user_id,
                event_state,
                e.company_id,
                e.seats_max,
                name_registration

The ids should be stored in a varchar instead of a char:
In the second line:
e.id::char || '/' || coalesce(r.id::char,'') AS id
should be replaced by:
e.id::varchar || '/' || coalesce(r.id::varchar,'') AS id

Tested with Chrome and Firefox.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1287066

Title:
  [saas-3/trunk]Event: Server error on Events Analysis when having more
  then 10 events

Status in OpenERP Addons (modules):
  New

Bug description:
  Scenario:
  1/ Create 11 events if necessary, we need to have 10 events or more. (no registrations needed)
  2/ Go to Reporting -> Event Analysis
  3/ The error "OpenERP Server Error" is shown twice and no data is displayed in the graph.

  We have the same problem in Dashboard/Events

  This is the complete error:
  Traceback (most recent call last):
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 363, in dispatch
      response["result"] = self._call_function(**self.params)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 220, in _call_function
      return checked_call(self.db, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/service/model.py", line 113, in wrapper
      return f(dbname, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 215, in checked_call
      return self.endpoint(*a, **kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 560, in __call__
      return self.method(*args, **kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/http.py", line 267, in response_wrap
      response = f(*args, **kw)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/addons/web/controllers/main.py", line 1205, in call_kw
      return self._call_kw(model, method, args, kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/addons/web/controllers/main.py", line 1197, in _call_kw
      return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-trunk-31504/server/openerp/osv/orm.py", line 2371, in read_group
      d['__domain'] = [(groupby, '=', alldata[d['id']][groupby] or False)] + domain
  KeyError: 'event_type'

  The origin of the error seem to come from the file "report_event_registration.py" in the module Event: 
              SELECT
                  e.id::char || '/' || coalesce(r.id::char,'') AS id,
                  e.id AS event_id,
                  e.user_id AS user_id,
                  r.user_id AS user_id_registration,
                  r.name AS name_registration,
                  e.company_id AS company_id,
                  e.date_begin AS event_date,
                  count(e.id) AS nbevent,
                  CASE WHEN r.state IN ('draft') THEN r.nb_register ELSE 0 END AS draft_state,
                  CASE WHEN r.state IN ('open','done') THEN r.nb_register ELSE 0 END AS confirm_state,
                  e.type AS event_type,
                  e.seats_max AS seats_max,
                  e.state AS event_state,
                  r.state AS registration_state
              FROM
                  event_event e
                  LEFT JOIN event_registration r ON (e.id=r.event_id)
              GROUP BY
                  event_id,
                  user_id_registration,
                  r.id,
                  registration_state,
                  r.nb_register,
                  event_type,
                  e.id,
                  e.date_begin,
                  e.user_id,
                  event_state,
                  e.company_id,
                  e.seats_max,
                  name_registration

  The ids should be stored in a varchar instead of a char:
  In the second line:
  e.id::char || '/' || coalesce(r.id::char,'') AS id
  should be replaced by:
  e.id::varchar || '/' || coalesce(r.id::varchar,'') AS id

  Tested with Chrome and Firefox.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1287066/+subscriptions


Follow ups

References