Odoo Help


ProgrammingError:can't adapt type 'product.template'

on 2/23/16, 2:44 AM 1,599 views

I am not able to write(update) data on product template object, here is the code which i am trying : to note binary conversion is working but while persisting data its showing can't adapt type error.

product_template_obj.set_images(cursor, user, product_template.id.id, {'image': tools.image_resize_image_big(image_binary)}, context=context)

its thowing error for this above statement

ProgrammingError : can't adapt type 'product.template'

product_template.id.id or product_template_id.id ???????????

Jusab Sida (jsi)
on 2/23/16, 4:31 AM
Krupesh Laiya
On 2/23/16, 7:29 AM

You used twice product_template.id.id just use product_template.id

 and use the write method to set the image.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/23/16, 2:44 AM
Seen: 1599 times
Last updated: 2/23/16, 7:29 AM