Community mailing list archives

Re: Editing Quotation Template

Luke Branch
- 05/27/2015 11:28:48

For anyone that's interested i've attached a sample Quotation/SaleOrder template for Aeroo Reports.

This particular report depends on the following modules:

product_customer_code (Written by Vauxoo):

product_customer_code_sale (Written by AgileBG) - depends on product_customer_code:

web_tree_image_order_line (written by Stefan Reijnhart, ported to 8.0 by Luke) - depends on web_tree_image:

web_tree_image (written by Stefan Riejnhart):

due to these columns in the report:

and the image in F25

I'll write a brief tutorial on writing reports for Aeroo for beginners as soon as I can find time, however if you have an understanding of fields and models in Odoo you should have no problem building reports to replace the default QWeb/PDF reports in Odoo.

The attached example is for generating a spreadsheet report. In a nutshell for creating text based output of a field you need to use hyperlinks. Just click Insert >> Hyperlink where you want to add a field and add the following to the 'Target' field in OpenOffice/LibreOffice:


then add the following in the 'Text' field in OpenOffice/LibreOffice:

SKU/Stock Code

The Hyperlink field is for adding very basic python logic. The Text field is simply what will be displayed on your template, and it useful for describing what the field is for when you're looking at the template file. 

You may find it useful to refer to the QWeb code for the template you're building (in the case of the example it would be the the saleorder report found in Settings >> Reports >> Reports > [Search for "saleorder"] >> Quotation/Order > [Click on "Search associated QWeb views"] > [Click on "report_saleorder_document"] for ideas on how to insert fields into your template.

For images, they need to be inserted into the report as a frame. Simply insert a placeholder image into the field you want the image in and then right click on the image and click 'Name' in OpenOffice/LibreOffice.

In the example file that it attached to this email we've added the product image on the SaleOrder line (this depends on web_tree_image_order_line module).

So if you take a look at the example file for the image in cell E25 and click the 'Name' option in the LibreOffice right click menu you'll see the following:

image: asimage(order_item.product_id.image_medium,size_x=145,size_y=145,hold_ratio=True)

You need to pay particular attention to the following section:


this has a similar structure to the hyperlink and you can see that it is pulling the field 'image_medium' from the related 'product_id' for that 'order_item' on the sale order line.

The following part controls the width and height of the image output (in px - ie. pixels):


and the following part tells the image to keep the width/height ratio:


In order to make sure images do not stretch and are anchored to the correct cell in your report output i'd recommend right-clicking on the image above and clicking 'Position and size' in the LibreOffice right click menu. Then choose to lock the position and size by ticking those boxes.

This is a very basic rundown, however it may be enough to get a few of you started on writing reports with Aeroo. I'll write a clearer, more detailed tutorial in the forums at a later date when I can find time.

For more example reports install the aeroo_reports_sample module and go to Settings >> Aeroo Reports >> Reports. To use the sample report attached go to:

Settings >> Aeroo Reports >> Reports > New

and refer to the screenshots attached for settings.

If you're interested in a more in depth tutorial subscribe to the following forum post and i'll update there when I can find time to write a more in-depth, coherent tutorial on creating reports for Aeroo in Odoo 8:



On Wed, May 27, 2015 at 9:52 PM, Luke Branch <> wrote:
Hi Yassine,

I haven't tried installing Odoo 8 and Aeroo Reports (for version 8) on Ubuntu 12.04 personally, so I can't answer your question from experience, however I don't think you'll have any issue with it.

Actually I believe the AerooDOCS library (using DocumentConverter) should work fine on Ubuntu 12.04 and 14.04 for the Odoo 8.0 version of Aeroo Reports. 

For the OpenERP version 7.0 of Aeroo Reports it uses a different way to connect to a (headless) version of OpenOffice with the module report_aeroo_ooo. This module has an external dependency for pyuno (python-uno) and in Ubuntu 12.04 this package is written for Python 2.7, and in Ubuntu 14.04 the package is written for Python 3+.

In a nutshell, installing Aeroo Reports in OpenERP 7 on Ubuntu 12.04 should be no problem using Ahmet's instructions in the forum post I mentioned in my previous email due to the correct python-uno package (written for Python 2.7). 

Installing Aeroo Reports in OpenERP 7 on Ubuntu 14.04 will not work unless you you rebuild OpenOffice/LibreOffice, or find some other workaround due to the python-uno package being written for Python 3+. There was a good discussion about this in this (now closed) github issue here:

@hbrunn's method is designed to rebuild OpenOffice/LibreOffice with the correct python-uno package version (written for Python 2.7). Be warned however that this script will take many many hours (5 hours for me) to run and will take up approximately 500MB. If you have a specific need to run OpenERP 7 and Aeroo Reports on Ubuntu 14.04 then @hbrunn's script along with Ahmet's instructions should give you enough information to get you up and running in Ubuntu 14.04.

I'd recommend trying the script on Ubuntu 12.04 and reporting back here with any errors you run into:

I'd be happy to modify the script to support Ubuntu 12.04 (Odoo 8), or create another script in that repository that is compatible with Ubuntu 12.04 when I can find time if you find it doesn't work.

There are many far more knowledgeable people in the community regarding this subject, so if there is any mistakes in the above explanation please feel free to correct me.



On Wed, May 27, 2015 at 8:00 PM, Yassine Teimi <> wrote:
Hi Luke, 

By reading your answer, I can't install odoo 8 on a Ubuntu server 12.04 LTS, or just I will have some later troubles with python version dependencies, as you stated on your email for aeroo report installation for example ? 


2015-05-27 8:57 GMT+01:00 Luke Branch <>:
Hi Tantomi,

There's a great tutorial/thread here that covers installing Aeroo Reports in Odoo 7.0:

Look specifically at Ahmet's guide, as well as the comments below his guide, as these will help you with the installation.

I haven't yet put together a script for version 7 and Ubuntu 12.04, and I do not have any plans to do so in the near future, so you'll need to follow the guide manually.

I believe this is written with Ubuntu 12.04 Server Edition in mind. It's important that you do not try to follow the guide with Ubuntu 14.04, as one of the key packages (UNO, or pyuno) is written for Python 3+ in Ubuntu 14.04, however you require it in Python 2.7+ to be compatible with Odoo 7.



On Wed, May 27, 2015 at 3:41 PM, Tantomi Yahya <> wrote:
Thanks for the reply 

Hi Luke,
can I use Aeroo report on Odoo v7? i forgot to tell it before...
Thank you

Hi Hans,
In the link you give its only how connect it with Open office.. 
I actually already to do that but I only can edit text position.
Is there any Tutorial to put image in it? 
Thank you

Pada Selasa, 26 Mei 2015 16:06, Hans Yonathan <> menulis:

Hello for version 7 you still can edit it with open office,
Here is the tutorial:
For version 8, I am afraid you can’t do that because Odoo has change their report system
Thank You.
Best Regards,
Hans Yonathan
Odoo Support
Expert in Finance, Information System & Business Intelligence
Odoo Silver Partner
Tel. 13670137019 (China - Shenzhen)
From: Tantomi Yahya []
Sent: Monday, May 25, 2015 5:39 PM
To: Community
Subject: Editing Quotation Template
Hello everbody,

I want to change the quotation template using Openoffice,
is there any tutorial about how to insert picture in it?
or maybe using another tools besides Openoffice?
Thank you
Post to:
Post to:

Post to:

Post to:



Yassine TEIMI

Consultant & Chef de Projet
TEL : +212 6-27 33 30 78

Post to: