Hi everybody,
I would like to add a picture in a SXW report. I know that is possible in rml, but how is possible in SXW?
Thank you a lot!
Selverine
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi everybody,
I would like to add a picture in a SXW report. I know that is possible in rml, but how is possible in SXW?
Thank you a lot!
Selverine
Try this: It's working for to add image in Report using by sxw file.
[[ o.product_id.image and setTag('para','image',{'width':'30','height':'30'}) ]] [[ o.product_id.image ]]
I am waiting your reply it's working fine.
Thanks.
Try this :
<image x="1.3cm" y="27.7cm" height="40.0" >[[ image.name or removeParentNode('image') ]]</image>
Are they some document about the SXW ? TO konw the different between SXW and RML?
Read the developer book of OpenERP. This book is available on OpenERP DOCUMENTATION section(e-book).
Hi Joseph, I'm also interested in this. Are you aware of any method to put images on sales order and purchase order lines in RML for v8/master?
Hi Joseph d'souza,
Thank you for your help.
It works only when i use it in rml code, but with my report in sxw it didn't works. Are they some documents about the SXW ? To know the difference between SXW and RML? Or to put some RML code directly in the SXW code?
My report print
" <image x="1.3cm" y="27.7cm" height="40.0" >="" ivborw0kgoaaansu.....="" and="" not="" print="" a="" picture<="" p="">
Have you an idea?
Thank you!
If you are looking to add a product image to a printed report (ie. PDF or HTML) sales order, purchase order, invoice, or any other report with product order lines I believe I have figured out a solution thanks to Fabrice Henrion's post here: https://www.odoo.com/forum/Help-1/question/Is-there-any-way-to-preview-WebKit-report-layout-while-coding-maybe-WYSIWYG-Editor-52307.
Simply follow Fabrice's instructions as follows (preferably use latest v8 master branch version):
If you want to add an image to an order line simply edit the HTML in the HTML editor found in the top navigation menu under Customize >> HTML Editor and find the place in the HTML/QWeb template that you would like to edit. I simply added an extra set of <th></th> tags as follows for a order line header (in the appropriate section of html/qweb that is):
<th class="text-left"><strong>Picture</strong></th>
and then added the following line for the sales order line product picture column:
<td class="text-center">
<span t-field="line.product_id.image_small" t-field-options="{"widget": "image", "class": "img-rounded"}"/>
</td>
The contents of the <span> tag pull the product image into the sales order line in the column that you want and when you save your html your report will display the appropriate product picture in 64px x 64px.
There may be a better way to do this and I welcome any comments on how this process might be improved.
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
maj 17
|
11209 | ||
Picture in report
Rozwiązane
|
|
1
lut 16
|
3455 | |
|
0
mar 15
|
4291 | ||
|
1
mar 15
|
5618 | ||
|
1
maj 22
|
6023 |