Translating reports in Odoo 8

Hi guys,

In this tutorial I will learn you how to translate (custom) Odoo reports.
In quite a lot of cases translations do not work on reports or they’re not yet translated by the community.You can fix this easily on your own Odoo though!
The trick to have translations always match up with the reports is to get the correct module name and the correct record ID.  So lets get started!

1. Getting the technical details

First of all search the QWeb report you wish to translate by going to settings > Reports > Reports. Search the report you wish to translate for in the list and open it up. In this example I will do this with the quotations report since translations aren’t correct in my language there.
When you’ve found the report you want to translate on (in this case Quotation / Order) and click on it you’ll get this view:
Overview report details

There is a clickable link named ‘Search associated QWeb views’, click on it. You will now get a new view which shows you the two XML records that are used to build this report. The top one is irrelevant and is used for loading translations so click on the second one ‘report_saleorder_document’. You always need the item that is named xxx_document.
Report views

Now that you’ve opened up this view you will see there are a lot of technical details here! There is an item named ‘Model Data’ with a clickable link right next to it. Click on this one.
Technical details report

You will now get this screen:
Full details report

As you can see I’ve highlighted two items, the ‘Record ID’ field and the ‘Module’ field. You will need those two fields to create a translation that always works.

2. Writing your translations

Now that you have the technical details you only need to create translations for it. Go to settings > Application Terms > Translated Terms and you will see all the Odoo translations show op. From here on we will need to filter out the data and see if there aren’t translations yet. In the topright corner you should do an advanced search on the Record ID, which is in my case 606.
Advanced search translations

Click on ‘Apply’ and you will now only see data that is translated for this report. In my example:
Dutch translations for my report

Tip: Are you not seeing any translations? This means there are none for the report you wish to translate! Simply click on the form view and you can then create a new one from scratch. Type over the values from the first screenshot down here and change the fields ‘module’, ‘Record ID’, ‘Source Term’ and ‘Translation’ to your values.

As you can see this is only a part of the translations that I should need for this report so we will need to add more. Open up the form view and you will see all the technical details for one of the translated items on the report. Do you notice something interesting yet?
Details form view translation

As you can see the Record ID and the module name are identical to the ones we found in part 1 of this tutorial. The combination of this module name and the exact ID of the QWeb report will always match up to the correct report, which means translated fields!
Now why would you create a new translation from scratch when you can re-use most of it? Click on the more button and then choose ‘Duplicate’.
Duplicate screen

Now an almost pre-filled record opens up. The only thing you have to do here is to change the Source Term and Translation to the text you want to translate. (Make sure the correct language is filled in where you want to write the translation for too). In my example on the quotation report the text ‘Description’ is not translated in Dutch as you can see:
Missing translation

So I will change the source term from ‘Date Ordered:’ to ‘Description and the Translation ‘Besteldatum’ to ‘Omschrijving’. Since you’ve duplicated this record and changed the values it will now be added as a new translation when you click on save. My example:
Translation field report

Click on save and you’ve made the new translation. Now repeat this process for all the fields you want to translate.

3. Synchronizing translations

The final step to make these translations work is to synchronize them. Go to settings > Application Terms > Synchronize Terms’ and click on it. A new dialog will now show up. Choose the language you made translations for and then click on ‘Update’.
Update translations

Go back to the report you wish to print and print it out. You will now see all the fields are translated!
Translated report

Tip: In case you want to translate Odoo in your language and want to share this with the community you should have a look at Launchpad translations. This is where translations are made by the community and they will become available for everybody!

Tutorial sponsored by Oocademy




Configure outgoing mailservers

Hi there!

In this tutorial I will explain you how to configure an outgoing mail server with Gmail.
Configuring outgoing mail servers in Odoo is one of the most simple things there are, you just need to know what exactly you should fill in.

First go to Settings > Email > Outgoing Mail servers and click on Create.
You will get a new window looking like this:
Sample empty email server
Let’s go over the fields:

  • Description: A description for the outgoing mail server.
  • Priority: The priority of your mail server. The lower the number the higher the priority. This will mean that the e-mailserver with the lowest number will be used the most.
  • SMTP server: The pointer to the SMTP of your server, for example smtp.gmail.com.
  • SMTP port: The port of your SMTP server, for example port 465 for Gmail.
  • Connection security: The type of security. You should choose SSL/TLS for Gmail. The data is then send over HTTPS.
  • Username: Your e-mail account, in this example youremail@gmail.com
  • Password: The password of your e-mail account.

For Gmail it will look like this:
Configured outgoing mailserver

Now save the record and from now on Odoo will send all your e-mails from Odoo to the person you want to e-mail.
TIP: by default the time that Odoo sends e-mails from Odoo is every 1 hour. If you wish to modify this you should go to Settings > Automation > Scheduled Actions and open up the record ‘Email Queue Manager’. Modify the time to your likings.. For example every 2 minutes:
Send mail every 2 minutes

For more information check out this Wikipedia article about mailservers.

Tutorial sponsored by Oocademy




Configure incoming mailservers

Hi there!

In this tutorial I will explain you how to configure an incoming mail server with Gmail.
Configuring incoming mail servers in Odoo is one of the most simple things there are, you just need to know what exactly you should fill in.

First go to Settings > Email > Incoming Mail servers and click on Create.
You will get a new window looking like this:
Sample empty email server
Let’s go over the fields:

  • Name: A name that you can choose, take something that clearly lets you know which email server this is.
  • Server Type: You can choose for POP, IMAP and local here. POP is the mostly used one and is used for getting emails from the server to a client.
  • Server Name: The name for the server. Usually you can find this with a simple Google search.
  • Port: The port where the server (e-mail) listens too.
  • SSL/TLS: Check this is you want to encrypt messages with SSL/TLS.
  • Username: The e-mailadress which you want to fetch e-mails from.
  • Password: The password for your e-mailaddress.

For Gmail it will look like this:
Configured incoming mailserver

Now save the record and from now on Odoo will fetch all your e-mails in to Odoo.
TIP: by default the time that Odoo fetches e-mails from your e-mail is every 1 hour. If you wish to modify this you should go to Settings > Automation > Scheduled Actions and open up the record ‘Email Queue Manager’. Modify the time to your likings.. For example every 2 minutes:
Fetch mail every 2 minutes

For more information check out this Wikipedia article about mailservers.

Tutorial sponsored by Oocademy