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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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>
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
2
sept 24
|
2542 | ||
|
2
may 24
|
4365 | ||
|
2
ago 21
|
7771 | ||
|
1
may 21
|
2738 | ||
|
1
abr 25
|
7567 |