← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 694728] Re: Cast Problem in res_partner

 

Sorry I was wrong - it only works in my latest initalized database - in
all other db's either the traceback raises OR it won't be stored without
a traceback.

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

Title:
  Cast Problem in res_partner

Status in OpenObject Server:
  Invalid

Bug description:
  openobject server rev: 3150

after updating to this revision, if I try to save a partner record this error occurs:

ERROR:db.cursor:Programming error: column "section_id" is of type integer but expression is of type text[]
LINE 1: ..."=E'False',"ref"=NULL,"company_id"=1,"section_id"=ARRAY[E'1'...
                                                             ^
HINT:  You will need to rewrite or cast the expression.
, in query update res_partner set "comment"=%s,"website"=%s,"user_id"=%s,"lang"=%s,"title"=%s,"supplier"=%s,"ref"=%s,"company_id"=%s,"section_id"=%s,"parent_id"=%s,"date"=%s,"customer"=%s,"active"=%s,"name"=%s,write_uid=%s,write_date=now() where id IN %s
[2010-12-27 14:21:10,121][xtix] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  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 "/home/openerp/addons/crm_profiling/crm_profiling.py", line 245, in write
    return super(partner, self).write(cr, uid, ids, vals, context=context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 3502, in write
    'where id IN %s', upd1 + [sub_ids])
  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: column "section_id" is of type integer but expression is of type text[]
LINE 1: ..."=E'False',"ref"=NULL,"company_id"=1,"section_id"=ARRAY[E'1'...
                                                             ^
HINT:  You will need to rewrite or cast the expression.





References