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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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>
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 9 24
|
2847 | ||
|
2
thg 5 24
|
4863 | ||
|
2
thg 8 21
|
8207 | ||
|
1
thg 5 21
|
3011 | ||
|
1
thg 9 25
|
4961 |