String value passed into context instead of int when having a self

Bug #1159909 reported by Thibault Delavallée (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Invalid
Medium
OpenERP R&D Web Team

Bug Description

String value passed into context instead of int when having a self.

Steps
- 7.0 runbot, with at least CRM installed
- Go into Leads
- Filter by searching a section / salesteam (ex: Sales Department) (which gives a 'Sales Team Sales Department' filter in the search bar)
- Click on create
- Get a traceback
    [...]
    File "/home/odoo/runbot/static/openerp-dev-7-0-5463/server/openerp/osv/orm.py", line 3656, in _read_flat
      cr.execute(query, [tuple(sub_ids)] + rule_params)
    File "/home/odoo/runbot/static/openerp-dev-7-0-5463/server/openerp/sql_db.py", line 161, in wrapper
      return f(self, *args, **kwargs)
    File "/home/odoo/runbot/static/openerp-dev-7-0-5463/server/openerp/sql_db.py", line 226, in execute
      res = self._obj.execute(query, params)
    DataError: invalid input syntax for integer: "Sales Department"
    LINE 1: ... "crm_case_section" WHERE crm_case_section.id IN ('Sales Dep...

Related view (crm/crm_lead_view.xml):
  <field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/>

Issue seems to be due to self.

affects: openobject-addons → openerp-web
Changed in openerp-web:
milestone: 7.0 → none
milestone: none → 7.0
summary: - String value passed into context instead of int
+ String value passed into context instead of int when having a self
description: updated
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

m2o fields are souped up text fields

Changed in openerp-web:
status: Confirmed → Invalid
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.