Replace the email template content form if you have any question to if you have any questions. task-1962924 Closes #33520 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
261 lines
14 KiB
XML
261 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<!-- Activities -->
|
|
<record id="mail_act_sale_upsell" model="mail.activity.type">
|
|
<field name="name">Order Upsell</field>
|
|
<field name="icon">fa-line-chart</field>
|
|
<field name="res_model_id" ref="sale.model_sale_order"/>
|
|
</record>
|
|
|
|
<!-- Sale-related subtypes for messaging / Chatter -->
|
|
<record id="mt_order_sent" model="mail.message.subtype">
|
|
<field name="name">Quotation sent</field>
|
|
<field name="res_model">sale.order</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="description">Quotation sent</field>
|
|
</record>
|
|
<record id="mt_order_confirmed" model="mail.message.subtype">
|
|
<field name="name">Sales Order Confirmed</field>
|
|
<field name="res_model">sale.order</field>
|
|
<field name="default" eval="False"/>
|
|
<field name="description">Quotation confirmed</field>
|
|
</record>
|
|
|
|
<!-- Salesteam-related subtypes for messaging / Chatter -->
|
|
<record id="mt_salesteam_order_sent" model="mail.message.subtype">
|
|
<field name="name">Quotation sent</field>
|
|
<field name="sequence">20</field>
|
|
<field name="res_model">crm.team</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="parent_id" eval="ref('sale.mt_order_sent')"/>
|
|
<field name="relation_field">team_id</field>
|
|
</record>
|
|
<record id="mt_salesteam_order_confirmed" model="mail.message.subtype">
|
|
<field name="name">Sales Order Confirmed</field>
|
|
<field name="sequence">21</field>
|
|
<field name="res_model">crm.team</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="parent_id" eval="ref('sale.mt_order_confirmed')"/>
|
|
<field name="relation_field">team_id</field>
|
|
</record>
|
|
<record id="mt_salesteam_invoice_created" model="mail.message.subtype">
|
|
<field name="name">Invoice Created</field>
|
|
<field name="sequence">22</field>
|
|
<field name="res_model">crm.team</field>
|
|
<field name="parent_id" eval="ref('account.mt_invoice_created')"/>
|
|
<field name="relation_field">team_id</field>
|
|
</record>
|
|
<record id="mt_salesteam_invoice_confirmed" model="mail.message.subtype">
|
|
<field name="name">Invoice Confirmed</field>
|
|
<field name="sequence">23</field>
|
|
<field name="res_model">crm.team</field>
|
|
<field name="parent_id" eval="ref('account.mt_invoice_validated')"/>
|
|
<field name="relation_field">team_id</field>
|
|
</record>
|
|
</data>
|
|
<!-- Template and notification section -->
|
|
<data noupdate="1">
|
|
<template id="mail_notification_paynow_online" inherit_id="mail.mail_notification_paynow" name="oezirhgoi">
|
|
<xpath expr="//t[@t-set='access_name']" position="after">
|
|
<t t-if="record._name == 'sale.order'">
|
|
<t t-if="record.has_to_be_signed(include_draft=True)">
|
|
<t t-if="record.has_to_be_paid()" t-set="access_name">Sign & Pay Quotation</t>
|
|
<t t-else="" t-set="access_name">Accept & Sign Quotation</t>
|
|
</t>
|
|
<t t-elif="record.has_to_be_paid(include_draft=True)">
|
|
<t t-set="access_name">Accept & Pay Quotation</t>
|
|
</t>
|
|
<t t-elif="record.state in ('draft', 'sent')">
|
|
<t t-set="access_name">View Quotation</t>
|
|
</t>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<record id="email_template_edi_sale" model="mail.template">
|
|
<field name="name">Sales Order: Send by email</field>
|
|
<field name="model_id" ref="sale.model_sale_order"/>
|
|
<field name="subject">${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
|
<field name="email_from">${(object.user_id.email_formatted or user.email_formatted) | safe}</field>
|
|
<field name="partner_to">${object.partner_id.id}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order'
|
|
Hello,
|
|
<br/><br/>
|
|
Your
|
|
% if ctx.get('proforma'):
|
|
Pro forma invoice for ${doc_name} <strong>${object.name}</strong>
|
|
% if object.origin:
|
|
(with reference: ${object.origin} )
|
|
% endif
|
|
amounting in <strong>${format_amount(object.amount_total, object.pricelist_id.currency_id)}</strong> is available.
|
|
% else:
|
|
${doc_name} <strong>${object.name}</strong>
|
|
% if object.origin:
|
|
(with reference: ${object.origin} )
|
|
% endif
|
|
amounting in <strong>${format_amount(object.amount_total, object.pricelist_id.currency_id)}</strong> is ready for review.
|
|
% endif
|
|
<br/><br/>
|
|
Do not hesitate to contact us if you have any questions.
|
|
<br/>
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="report_template" ref="action_report_saleorder"/>
|
|
<field name="report_name">${(object.name or '').replace('/','_')}</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="user_signature" eval="False"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<record id="mail_template_sale_confirmation" model="mail.template">
|
|
<field name="name">Sales Order: Confirmation Email</field>
|
|
<field name="model_id" ref="sale.model_sale_order"/>
|
|
<field name="subject">${object.company_id.name} ${(object.get_portal_last_transaction().state == 'pending') and 'Pending Order' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
|
<field name="email_from">${(object.user_id.email_formatted or user.email_formatted) | safe}</field>
|
|
<field name="partner_to">${object.partner_id.id}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px; padding: 0px; font-size: 12px;">
|
|
Hello,
|
|
<br/><br/>
|
|
% set transaction = object.get_portal_last_transaction()
|
|
Your order <strong>${object.name}</strong> amounting in <strong>${format_amount(object.amount_total, object.currency_id)}</strong>
|
|
% if object.state == 'sale' or (transaction and transaction.state in ('done', 'authorized')) :
|
|
has been confirmed.<br/>
|
|
Thank you for your trust!
|
|
% elif transaction and transaction.state == 'pending' :
|
|
is pending. It will be confirmed when the payment is received.
|
|
% if object.reference:
|
|
Your payment reference is <strong>${object.reference}</strong>.
|
|
% endif
|
|
% endif
|
|
<br/><br/>
|
|
Do not hesitate to contact us if you have any questions.
|
|
<br/><br/>
|
|
% if object.website_id:
|
|
<table width="100%" style="color: #454748; font-size: 12px; border-collapse: collapse;">
|
|
<tr style="border-bottom: 2px solid #dee2e6;">
|
|
<td width="18%"><strong>Products</strong></td>
|
|
<td></td>
|
|
<td><strong>Quantity</strong></td>
|
|
<td width="10%" align="center"><strong>Price</strong></td>
|
|
</tr>
|
|
% for line in object.order_line:
|
|
% if not line.is_delivery:
|
|
<tr style="${loop.cycle('background-color: #f2f2f2', 'background-color: #ffffff')}">
|
|
% if line.display_type == 'line_section':
|
|
<td colspan="4"><strong>${line.name}</strong></td>
|
|
% elif line.display_type == 'line_note':
|
|
<td colspan="4"><i>${line.name}</i></td>
|
|
% else:
|
|
<td style="width: 150px;">
|
|
<img src="/web/image/product.product/${line.product_id.id}/image_small" width="64" alt="Product image"></img>
|
|
</td>
|
|
<td align="left">${line.product_id.name}</td>
|
|
<td>${line.product_uom_qty}</td>
|
|
% if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):
|
|
<td align="right">${format_amount(line.price_reduce_taxexcl, object.currency_id)}</td>
|
|
% endif
|
|
% if object.user_id.has_group('account.group_show_line_subtotals_tax_included'):
|
|
<td align="right">${format_amount(line.price_reduce_taxinc, object.currency_id)}</td>
|
|
% endif
|
|
% endif
|
|
</tr>
|
|
% endif
|
|
% endfor
|
|
</table>
|
|
<table width="40%" style="color: #454748; font-size: 12px; border-spacing: 0px 4px;" align="right">
|
|
% if object.carrier_id:
|
|
<tr>
|
|
<td style="border-top: 1px solid #dee2e6;" align="right"><strong>Delivery:</strong></td>
|
|
<td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_delivery, object.currency_id)}</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30%" align="right"><strong>SubTotal:</strong></td>
|
|
<td align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
|
|
</tr>
|
|
% else:
|
|
<tr>
|
|
<td style="border-top: 1px solid #dee2e6;" width="30%" align="right"><strong>SubTotal:</strong></td>
|
|
<td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>
|
|
</tr>
|
|
% endif
|
|
<tr>
|
|
<td align="right"><strong>Taxes:</strong></td>
|
|
<td align="right">${format_amount(object.amount_tax, object.currency_id)}</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-top: 1px solid #dee2e6;" align="right"><strong>Total:</strong></td>
|
|
<td style="border-top: 1px solid #dee2e6;" align="right">${format_amount(object.amount_total, object.currency_id)}</td>
|
|
</tr>
|
|
</table>
|
|
<br/>
|
|
<table width="100%" style="color: #454748; font-size: 12px;">
|
|
% if object.partner_invoice_id:
|
|
<tr>
|
|
<td style="padding-top: 10px;">
|
|
<strong>Bill to:</strong>
|
|
${object.partner_invoice_id.street or ''}
|
|
${object.partner_invoice_id.city or ''}
|
|
${object.partner_invoice_id.state_id.name or ''}
|
|
${object.partner_invoice_id.zip or ''}
|
|
${object.partner_invoice_id.country_id.name or ''}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Payment Method:</strong>
|
|
% if transaction.payment_token_id:
|
|
${transaction.payment_token_id.name}
|
|
% else:
|
|
${transaction.acquirer_id.name}
|
|
% endif
|
|
(${format_amount(transaction.amount, object.currency_id)})
|
|
</td>
|
|
</tr>
|
|
% endif
|
|
% if object.partner_shipping_id and not object.only_services:
|
|
<tr>
|
|
<td>
|
|
<br/>
|
|
<strong>Ship to:</strong>
|
|
${object.partner_shipping_id.street or ''}
|
|
${object.partner_shipping_id.city or ''}
|
|
${object.partner_shipping_id.state_id.name or ''}
|
|
${object.partner_shipping_id.zip or ''}
|
|
${object.partner_shipping_id.country_id.name or ''}
|
|
</td>
|
|
</tr>
|
|
% if object.carrier_id:
|
|
<tr>
|
|
<td>
|
|
<strong>Shipping Method:</strong>
|
|
${object.carrier_id.name}
|
|
% if object.carrier_id.fixed_price == 0.0:
|
|
(Free)
|
|
% else:
|
|
(${format_amount(object.carrier_id.fixed_price, object.currency_id)})
|
|
% endif
|
|
</td>
|
|
</tr>
|
|
% endif
|
|
% endif
|
|
</table>
|
|
% endif
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="report_template" ref="action_report_saleorder"/>
|
|
<field name="report_name">${(object.name or '').replace('/','_')}</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="user_signature" eval="False"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
</data>
|
|
</odoo>
|