ProgrammingError: can't adapt

Asked by javedamar

hi
i using the module hr_payroll when i create a fresh database then i can access the menu
Human Resources / Configuration / PayRoll / Employee Functions
but if i restore a database and want to use that menu it gives me below error

Environment Information :
System : Linux-2.6.31-22-generic-i686-with-Ubuntu-9.10-karmic
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
Operating System Release : 2.6.31-22-generic
Operating System Version : #60-Ubuntu SMP Thu May 27 00:22:23 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.4
OpenERP-Client Version : 5.0.11
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/alam/Downloads/server/bin/netsvc.py", line 247, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/alam/Downloads/server/bin/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/home/alam/Downloads/server/bin/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/alam/Downloads/server/bin/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/alam/Downloads/server/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/alam/Downloads/server/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/alam/Downloads/server/bin/osv/orm.py", line 2228, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/alam/Downloads/server/bin/osv/orm.py", line 2320, in _read_flat
    res2 = self.pool.get(table).read(cr, user, [x[col] for x in res], cols, context, load)
  File "/home/alam/Downloads/server/bin/osv/orm.py", line 2228, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/alam/Downloads/server/bin/osv/orm.py", line 2301, in _read_flat
    cr.execute(query, (tuple(sub_ids),))
  File "/home/alam/Downloads/server/bin/sql_db.py", line 77, in wrapper
    return f(self, *args, **kwargs)
  File "/home/alam/Downloads/server/bin/sql_db.py", line 122, in execute
    res = self._obj.execute(query, params)
  File "/usr/lib/python2.6/dist-packages/psycopg2/extensions.py", line 96, in getquoted
    pobjs = [adapt(o) for o in self._seq]
ProgrammingError: can't adapt

could any body tell me what i should do ?
thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
javedamar (javedamar) said :
#1

any suggestions ? any tip ? any clue that i could solve my problem ?

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#2

Hello Javedamar ,

You need to update your restore database completely using following from linux terminal:

./openerp-server.py -u all -d <database-name>.

If your database will update successfully and not raising any error then your backup database will work , Otherwise you need to create new database.

Thanks.

Revision history for this message
javedamar (javedamar) said :
#3

hello vra
thanks for reply
i already tried this option but it didn't work i want to tell you some thing that the backup of database which i want to restore is already in use by some one else and working properly
the second point is that backup of database restored properly on the third system it means i have some problem in my system could now u help me ?

thanks

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#4

Hello Javedamar ,

You need to try this with new latest code of server, client and addons.
If you will face similar problem again then I need the traceback from terminal.

Thanks.

Can you help with this problem?

Provide an answer of your own, or ask javedamar for more information if necessary.

To post a message you must log in.