İçereği Atla
Menü
Bu soru işaretlendi
7 Cevaplar
36629 Görünümler

Hi all,

I use Odoo V 10. I would like to change the theme (header color, etc.) of an email (ex. sale order) send by Odoo. Is it possible ?

Also, I've changed the default email text and I would like that the one I've wrote is the default one. How could i do that ?

Thanks

.Arnaud

Avatar
Vazgeç
En İyi Yanıt

Hi Pravitha,

your answer sounds great.

But I'm lost at two things:

First: 'Just create a custom module inherit sale.order,'

What Do you mean with inherit sale.order?

Can you give an example how the model inheritance should look like to inherit a email template.
An email template is data not a model. I have no clue what you are going to achieve with that inheritance.


Second: 'Note: don't forget to override the function call to email template to redirect to your new template.'

Again, please give an example how to code that into my custom modul to overwrite e.g. 'auth_signup.reset_password_email'.


Guess you gave a very good answer.
But I'm an newbee and need some code to look at to build the solutiuon into my own modul.


Thanx and Cheers.

Stephan



Avatar
Vazgeç
En İyi Yanıt

For customizing the email template,  you can create your own email template in sale order or any other module you want. you can find the existing sale order template in addons/sale/data/mail_template_data.xml.

You can customize the email templates either by editing from the Odoo UI at Settings/Technical/Email/Templates select the template to change and customize accordingly.

Or else the solution I prefer is to create a custom template from backend coding. The samples I mentioned before can help you in this. Just create a custom module inherit sale.order, then create a data folder and an XML file and create your own template. 

Note: don't forget to override the function call to email template to redirect to your new template.


Avatar
Vazgeç
Üretici En İyi Yanıt

Hi Pravintha,

Thanks for your answer. I would like to try your first solution (customize the email template by editing from the Odoo UI) but I can't find the template in the settings > view nor in settings > report. Could you please give me the name of the file ?


Thanks,

Arnaud

Avatar
Vazgeç

Activate the developer mode and try

Üretici

I have already did it. If not I could not have the view and report menu ;)

Do you have have the exact view name or report name of the template for the mail ?

Thanks

settings->email->templates

Üretici

Hi Hilar,

Ok I have finally found it. Thanks for your help :)

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Mar 24
8282
1
May 25
1121
2
May 25
1181
0
Nis 25
1021
1
Nis 25
1353