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

When using "Invoice - Send by Email template" the email is empty

By
Tom Albertsma
on 8/3/15, 10:51 AM 632 views

I use this code to make an email when sending an invoice.



Hallo ${object.partner_id.name},

Er is een nieuwe factuur voor u beschikbaar:

REFERENTIES

Factuur nummer: ${object.number}

Factuur totaal: ${object.amount_total} ${object.currency_id.name}

Factuur datum: ${object.date_invoice}

% if object.origin: Order referentie: ${object.origin}

% endif % if object.user_id: Uw contactpersoont: ${object.user_id.name} % endif

<% set signup_url = object.get_signup_url() %> % if signup_url:

U kunt de factuur online bekijken en betalen via de klant portaal:

Bekijk factuur

% endif % if object.paypal_url:

Het is ook mogelijk om te betalen via Paypal:

% endif

Indien u vragen heeft, aarzel dan niet om contact met ons op te nemen.

Dank u voor het kiezen voor ${object.company_id.name or 'us'}!

${OBJECT.COMPANY_ID.NAME}

% if object.company_id.street: ${object.company_id.street}

% endif % if object.company_id.street2: ${object.company_id.street2}

% endif % if object.company_id.city or object.company_id.zip: ${object.company_id.zip} ${object.company_id.city}

% endif % if object.company_id.country_id: ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}

% endif

% if object.company_id.phone:

Telefoon: ${object.company_id.phone}

% endif % if object.company_id.website:

Website : ${object.company_id.website}

% endif


The result when using this template is that the email is just empty. I have to make the email al by myself.


Is there a soilution to this problem?

You must first revert to the actual template. Its already working. Then, check each time the preview when you are adding your changes. this way you will be identifying what custom code is hurting your template. Use object as case sensitive text.

Serpent Consulting Services Pvt. Ltd.
on 8/4/15, 2:03 AM
0
Tom Albertsma
On 8/4/15, 5:12 AM

Thanks for the answers..

How do I revert  to the initial template?

0
David MacDonald
On 8/3/15, 1:38 PM

Hi Tom,

 try replacing ${OBJECT.COMPANY_ID.NAME} by the lower cases : ${object.company_id.name}.

I guess it is case sensitive.

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

1 follower(s)

Stats

Asked: 8/3/15, 10:51 AM
Seen: 632 times
Last updated: 8/4/15, 5:12 AM