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

[8.0] Odoo 8: How can I add images in sale.oder.line or in treeview generally?

By
Luke Branch
on 3/20/15, 12:19 AM 1,298 views

is is an updated thread catering to this question for Odoo 8.0. The original 7.0 thread was getting a little chaotic so I decided to create a new thread for the question.

If you would like to add an image to the tree view on the sales order line or quotation line, please install the following module (instructions on Github in README):

https://github.com/OdooCommunityWidgets/web_tree_image_order_line 

I've simply ported Stefan's original work for 7.0 to make it 8.0-compatible. He has also built another module to support the image in tree view here:

https://github.com/OCA/web/tree/8.0/web_tree_image

The OdooCommunityWidgets module is dependant on the OCA module to function correctly. Please make sure you install both.


Here's a link to the original question:

 
https://www.odoo.com/forum/help-1/question/odoo-7-how-can-i-add-images-in-sale-oder-line-or-in-treeview-generally-483

here's the question content:.

"By 

Stefan Reisich 

 on 2/8/13, 9:39 PM

how can I add small images in sale.order.line in OpenERP 7 web client? So that each product in orders or quotations has as small image.

Thank you very much."

You can get some help from here: https://www.odoo.com/forum/how-to/developers-13/how-to-show-thumbnail-image-in-list-view-19907

Jusab Sida (jsi)
on 6/26/15, 9:03 AM
0
Stefano Del Gobbo
On 8/5/15, 4:42 AM

Same result as shriram sampat. Did you find the way?

0
shriram sampat
On 6/26/15, 8:07 AM

I  installed both the apps web_tree_image and product_image_list_view and I am still getting only download links instead of images in tree view. In sale order line, I am able to see an image. But when I edit the product.template tree view (warehouse -> products) to add "<field name="image_small" widget='image'/>" I am seeing only download link instead of the images. Is this the correct way to include image in list view ?

Edit : After some debugging, I found out that row_data[this.id].value returns the size string ("xxxx bytes"/"xxxx kB",..) instead of the binary value !. This results in 

<img src="data:image/png;base64,127 kB" width="64px" height="64px">

Notice the 127 kB . Here the value of field should be printed out.

May be someone can tell me why size is being returned instead of value.

I am using bitnami odoo instance 8.0-8 which uses odoo nightly version 8.0-20150423

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

3 follower(s)

Stats

Asked: 3/20/15, 12:19 AM
Seen: 1298 times
Last updated: 4/30/16, 9:53 AM