How to adapt your Email Template for Invoice vs Refund (customer) ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hello,
When sending a refund by email, the default template is not update as it should.
If it is a refund, Odoo still shows Invoice in the email.
This can mislead the customer.
Object update:
${object.company_id.name} ${object.type in ('out_refund') and 'Refund' or 'Invoice'} (Ref ${object.number or 'n/a'})
Body update:
<div>
<p>Dear ${object.partner_id.name}
% set access_action = object.with_context(force_website=True).get_access_action()
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
% set access_url = object.get_mail_url()
% if object.partner_id.parent_id:
(<i>${object.partner_id.parent_id.name}</i>)
% endif
,</p>
<p>Here is, in attachment, your
% if object.number:
% if object.type=='out_refund':
refund <strong>${object.number}</strong>
% else:
invoice <strong>${object.number}</strong>
% endif
% else:
% if object.type=='out_refund':
refund
% else:
invoice
% endif
% endif
% if object.origin:
(with reference: ${object.origin})
% endif
amounting in <strong>${format_amount(object.amount_total, object.currency_id)}</strong>
from ${object.company_id.name}.
</p>
% if is_online:
<br><br>
<center>
<a href="${access_url}" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">View Document</a>
</center>
% endif
<br><br>
% if object.type=='out_refund':
% if object.partner_id.bank_account_count != 0:
<p> Payment will be done on your bank account.</p>
% else:
<p>Please, send us your bank account details.</p>
%endif
%endif
% if object.state=='paid':
<p>This invoice has been paid. If you are a direct debit customer we will debit your account on the due date of your invoice.</p>
% else:
<p>Please remit payment at your earliest convenience.</p>
% endif
<p>Thank you,</p>
<p style="color:#888888">
% if object.user_id and object.user_id.signature:
${object.user_id.signature | safe}
% endif
</p>
</div>
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
2
sep. 24
|
2834 | ||
|
2
mei 24
|
4827 | ||
|
2
aug. 21
|
8185 | ||
|
1
mei 21
|
3001 | ||
|
1
sep. 25
|
4922 |