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

[9.0] How to solve this error : ProgrammingError: can't adapt type 'ing_config'

By
Tatorus
on 3/16/16, 5:15 AM 262 views

Hi, I have to migrate a custom module from V8 to V9 but I have a problem, the source code works in V8 but not in V9, I have this error :

  File "/usr/local/lib/python2.7/dist-packages/odoo-9.0c-py2.7.egg/openerp/addons/Ing_WIPv9/sale.py", line 177, in product_id_change
    prix,quantite=self.actualisationPrix(self.env['ing_config'].browse(idsearch[0]),donnee)

ProgrammingError: can't adapt type 'ing_config'


Source code V8:

print "cr =",cr

print "uid =",uid

print "ids =",ids

print "self.pool.get('ing_config').browse(cr,uid,idsearch[0]),donnee =",self.pool.get('ing_config').browse(cr,uid,idsearch[0]),donnee

prix,quantite=self.actualisationPrix(cr,uid,ids,self.pool.get('ing_config').browse(cr,uid,idsearch[0]),donnee)

Prints V8:

cr = <openerp.sql_db.Cursor object at 0x7f9ec2b5a290>

uid = 1

ids = []

self.pool.get('ing_config').browse(cr,uid,idsearch[0]),donnee = ing_config(1,) product.product(87379,)


Source code V9:

print "self.env['ing_config'].browse(idsearch[0]),donnee =",self.env['ing_config'].browse(idsearch[0]),donnee

prix,quantite=self.actualisationPrix(self.env['ing_config'].browse(idsearch[0]),donnee)

Prints V9:

self.env['ing_config'].browse(idsearch[0]),donnee = ing_config(ing_config(1,),) product.product(7327,)


0
Tatorus
On 3/16/16, 5:42 AM

[Solved]

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

1 follower(s)

Stats

Asked: 3/16/16, 5:15 AM
Seen: 262 times
Last updated: 3/16/16, 7:34 AM