Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Bug following a contact import : column res_partner_bank.active doesn't exist

By
NIcolas Plée
on 6/5/13, 10:17 PM 2,108 views

Hello girls, guys, I'm very surprised with this and I don't know how get rid of it.

Migrating the partner contacts from 6.1 to 7 (OCB version), I exported, modified and imported the base. Everything went find , everything looked good when I was on the webpage Sales/Customers but when I clicked on one of the contact I get the following error :

2013-06-05 22:19:29,911 16463 ERROR dataup openerp.sql_db: Programming error: column res_partner_bank.active does not exist
LINE 1: ..._partner_bank".id FROM "res_partner_bank" WHERE (("res_partn...
                                                             ^
, in query SELECT "res_partner_bank".id FROM "res_partner_bank" WHERE (("res_partner_bank"."active" = %s)  AND  ("res_partner_bank"."partner_id" in (%s))) ORDER BY "res_partner_bank"."sequence"  
2013-06-05 22:19:29,911 16463 ERROR dataup openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3605, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3725, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/server/openerp/osv/fields.py", line 536, in get
    ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2354, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4859, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/opt/openerp/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column res_partner_bank.active does not exist
LINE 1: ..._partner_bank".id FROM "res_partner_bank" WHERE (("res_partn...
                                                             ^

2013-06-05 22:19:29,912 16463 ERROR dataup openerp.netsvc: column res_partner_bank.active does not exist
LINE 1: ..._partner_bank".id FROM "res_partner_bank" WHERE (("res_partn...
                                                             ^
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3605, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/opt/openerp/server/openerp/osv/orm.py", line 3725, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/opt/openerp/server/openerp/osv/fields.py", line 536, in get
    ids2 = obj.pool.get(self._obj).search(cr, user, domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 2354, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4859, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/opt/openerp/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column res_partner_bank.active does not exist
LINE 1: ..._partner_bank".id FROM "res_partner_bank" WHERE (("res_partn...

I'd like to understand what happened. How may the import created that ? I tested he same import on another install of openerp 7 (official bazaar version) but the problem didn't happen. I had a try on a fresh database on v7-OCB (same install as the one used first) but same problem happened again.

Thanks

2
Ronald Portier
On 7/17/13, 11:59 AM

I encountered the same problem.

Reason: in newer versions of the res.partner.bank model a field active has been added, but the database was not updated.

Solution, start your server specifying your database and asking for an update of the base module. Like this:

openerp-server -c your_config_file -d your_database --u base

Thank you so much for your answer. i just updated it and It worked perfectly !

NIcolas Plée
on 8/6/13, 5:39 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/5/13, 10:17 PM
Seen: 2108 times
Last updated: 3/16/15, 8:10 AM