Merge pull request #5720 from expsa/purchase_emails_templates
modifying purchase email templates
This commit is contained in:
commit
179989e497
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
|
|
@ -7,31 +7,32 @@
|
||||||
<field name="body_html"><![CDATA[
|
<field name="body_html"><![CDATA[
|
||||||
<div style="direction: rtl; text-align: right; font-family: Arial, sans-serif; padding: 20px; border: 1px solid #ddd;">
|
<div style="direction: rtl; text-align: right; font-family: Arial, sans-serif; padding: 20px; border: 1px solid #ddd;">
|
||||||
<div style="text-align: left; margin-bottom: 20px;">
|
<div style="text-align: left; margin-bottom: 20px;">
|
||||||
<img src="${object.company_id.get_base_url()}/web/image/res.company/${object.company_id.id}/logo"
|
<img src="${object.company_id.get_base_url()}/odex25_purchase_coc/static/src/img/Odex-logo.png"
|
||||||
alt="Company Logo"
|
alt="ODEX"
|
||||||
width="120" height="50"
|
width="200" height="48"
|
||||||
style="display: block; margin: auto;"/>
|
style="display: block; margin: auto;"/>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<p style="font-weight:bold; font-size:14px;">مرحبًا ${ctx.get('manager_name')},</p>
|
<p style="font-weight:bold; font-size:14px;">Hello ${ctx.get('manager_name')},</p>
|
||||||
<p style="font-weight:bold; font-size:14px;">
|
<p style="font-weight:bold; font-size:14px;">
|
||||||
لديك شهادة إنجاز برقم
|
You have a completion certificate number
|
||||||
<a href=""
|
<a href=""
|
||||||
style="color: blue; text-decoration: underline;">
|
style="padding: 8px 12px; font-size: 12px; color: #FFFFFF; text-decoration: none !important; font-weight: 400; background-color: #3F5D7E; border: 0px solid #3F5D7E; border-radius:3px; display: inline-block;">
|
||||||
${object.name}
|
${object.name}
|
||||||
</a>
|
</a>
|
||||||
يرجى تأكيد استلام الخدمات.
|
Please confirm receipt of services.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
<div style="text-align: center; margin-bottom: 20px;">
|
<div style="text-align: center; margin-bottom: 20px;">
|
||||||
<img src="${object.company_id.get_base_url()}/web/image/res.company/${object.company_id.id}/logo"
|
<img src="${object.company_id.get_base_url()}/odex25_purchase_coc/static/src/img/Odex-logo.png"
|
||||||
alt="Company Logo"
|
alt="ODEX"
|
||||||
width="120" height="50"
|
width="200" height="48"
|
||||||
style="display: block; margin: auto;"/>
|
style="display: block; margin: auto;"/>
|
||||||
</div>
|
</div>
|
||||||
<p style="text-align: center; color: #888;">${object.company_id.name} | ${object.company_id.email}</p>
|
<p style="text-align: center; color: #888;">${object.company_id.name} | ${object.company_id.email}</p>
|
||||||
<p style="margin-top: 20px;">
|
<p style="font-size: 1.1em; text-align: center; color: #000000; font-weight: bold; margin-top: 20px;">
|
||||||
|
Sent by <span style="color: #3F5D7E; font-weight: bold;">${object.company_id.name}</span> using <span style="color: #3F5D7E; font-weight: bold;">Odex</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
]]></field>
|
]]></field>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
'data/purchase_request_seq.xml',
|
'data/purchase_request_seq.xml',
|
||||||
'data/cron_data.xml',
|
'data/cron_data.xml',
|
||||||
'data/server_actions.xml',
|
'data/server_actions.xml',
|
||||||
|
'data/mail_template.xml',
|
||||||
|
'data/purchase_mail_template_custom.xml',
|
||||||
'views/purchase_requisition_custom.xml',
|
'views/purchase_requisition_custom.xml',
|
||||||
'views/purchase_request.xml',
|
'views/purchase_request.xml',
|
||||||
'views/purchase_order.xml',
|
'views/purchase_order.xml',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data noupdate="1">
|
||||||
|
<!-- Override: Purchase Order: Send RFQ -->
|
||||||
|
<record id="purchase.email_template_edi_purchase" model="mail.template">
|
||||||
|
<field name="name">Purchase Order: Send RFQ</field>
|
||||||
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||||
|
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
||||||
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-family: Arial, sans-serif;">
|
||||||
|
<!-- ODEX Logo -->
|
||||||
|
<div style="text-align: center; margin-bottom: 20px;">
|
||||||
|
<img src="${object.company_id.get_base_url()}/purchase_requisition_custom/static/src/img/Odex-logo.png"
|
||||||
|
alt="ODEX"
|
||||||
|
style="max-width: 200px; height: 48px;"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear ${object.partner_id.name}
|
||||||
|
% if object.partner_id.parent_id:
|
||||||
|
(${object.partner_id.parent_id.name})
|
||||||
|
% endif
|
||||||
|
<br/><br/>
|
||||||
|
Here is in attachment a request for quotation <strong>${object.name}</strong>
|
||||||
|
% if object.partner_ref:
|
||||||
|
with reference: ${object.partner_ref}
|
||||||
|
% endif
|
||||||
|
from ${object.company_id.name}.
|
||||||
|
<br/><br/>
|
||||||
|
If you have any questions, please do not hesitate to contact us.
|
||||||
|
<br/><br/>
|
||||||
|
Best regards,
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd;">
|
||||||
|
<p style="font-size: 1.1em; text-align: center; color: #000000; font-weight: bold;">
|
||||||
|
Sent by <span style="color: #3F5D7E; font-weight: bold;">${object.company_id.name}</span> using <span style="color: #3F5D7E; font-weight: bold;">Odex</span>
|
||||||
|
</p>
|
||||||
|
<p style="text-align: center; color: #888; font-size: 12px;">
|
||||||
|
${object.company_id.phone or ''}
|
||||||
|
% if object.company_id.email:
|
||||||
|
| ${object.company_id.email}
|
||||||
|
% endif
|
||||||
|
% if object.company_id.website:
|
||||||
|
| ${object.company_id.website}
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div></field>
|
||||||
|
<field name="report_template" ref="purchase.report_purchase_quotation"/>
|
||||||
|
<field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field>
|
||||||
|
<field name="lang">${object.partner_id.lang}</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Override: Purchase Order: Send PO -->
|
||||||
|
<record id="purchase.email_template_edi_purchase_done" model="mail.template">
|
||||||
|
<field name="name">Purchase Order: Send PO</field>
|
||||||
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||||
|
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
||||||
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-family: Arial, sans-serif;">
|
||||||
|
<!-- ODEX Logo -->
|
||||||
|
<div style="text-align: center; margin-bottom: 20px;">
|
||||||
|
<img src="${object.company_id.get_base_url()}/purchase_requisition_custom/static/src/img/Odex-logo.png"
|
||||||
|
alt="ODEX"
|
||||||
|
style="max-width: 200px; height: 48px;"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear ${object.partner_id.name}
|
||||||
|
% if object.partner_id.parent_id:
|
||||||
|
(${object.partner_id.parent_id.name})
|
||||||
|
% endif
|
||||||
|
<br/><br/>
|
||||||
|
Here is in attachment a purchase order <strong>${object.name}</strong>
|
||||||
|
% if object.partner_ref:
|
||||||
|
with reference: ${object.partner_ref}
|
||||||
|
% endif
|
||||||
|
amounting in <strong>${format_amount(object.amount_total, object.currency_id)}</strong>
|
||||||
|
from ${object.company_id.name}.
|
||||||
|
<br/><br/>
|
||||||
|
% if object.date_planned:
|
||||||
|
The receipt is expected for <strong>${format_date(object.date_planned)}</strong>.
|
||||||
|
<br/><br/>
|
||||||
|
Could you please acknowledge the receipt of this order?
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd;">
|
||||||
|
<p style="font-size: 1.1em; text-align: center; color: #000000; font-weight: bold;">
|
||||||
|
Sent by <span style="color: #3F5D7E; font-weight: bold;">${object.company_id.name}</span> using <span style="color: #3F5D7E; font-weight: bold;">Odex</span>
|
||||||
|
</p>
|
||||||
|
<p style="text-align: center; color: #888; font-size: 12px;">
|
||||||
|
${object.company_id.phone or ''}
|
||||||
|
% if object.company_id.email:
|
||||||
|
| ${object.company_id.email}
|
||||||
|
% endif
|
||||||
|
% if object.company_id.website:
|
||||||
|
| ${object.company_id.website}
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div></field>
|
||||||
|
<field name="report_template" ref="purchase.action_report_purchase_order"/>
|
||||||
|
<field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
|
||||||
|
<field name="lang">${object.partner_id.lang}</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Override: Purchase Order: Vendor Reminder -->
|
||||||
|
<record id="purchase.email_template_edi_purchase_reminder" model="mail.template">
|
||||||
|
<field name="name">Purchase Order: Vendor Reminder</field>
|
||||||
|
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||||
|
<field name="email_from">${(object.user_id.email_formatted or user.email_formatted) |safe}</field>
|
||||||
|
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
||||||
|
<field name="partner_to">${object.partner_id.id}</field>
|
||||||
|
<field name="body_html" type="html">
|
||||||
|
<div style="margin: 0px; padding: 0px; font-family: Arial, sans-serif;">
|
||||||
|
<!-- ODEX Logo -->
|
||||||
|
<div style="text-align: center; margin-bottom: 20px;">
|
||||||
|
<img src="${object.company_id.get_base_url()}/purchase_requisition_custom/static/src/img/Odex-logo.png"
|
||||||
|
alt="ODEX"
|
||||||
|
style="max-width: 200px; height: 48px;"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
||||||
|
Dear ${object.partner_id.name}
|
||||||
|
% if object.partner_id.parent_id:
|
||||||
|
(${object.partner_id.parent_id.name})
|
||||||
|
% endif
|
||||||
|
<br/><br/>
|
||||||
|
Here is a reminder that the delivery of the purchase order <strong>${object.name}</strong>
|
||||||
|
% if object.partner_ref:
|
||||||
|
<strong>(${object.partner_ref})</strong>
|
||||||
|
% endif
|
||||||
|
is expected for
|
||||||
|
% if object.date_planned:
|
||||||
|
<strong>${format_date(object.date_planned)}</strong>.
|
||||||
|
% else:
|
||||||
|
<strong>undefined</strong>.
|
||||||
|
% endif
|
||||||
|
Could you please confirm it will be delivered on time?
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd;">
|
||||||
|
<p style="font-size: 1.1em; text-align: center; color: #000000; font-weight: bold;">
|
||||||
|
Sent by <span style="color: #3F5D7E; font-weight: bold;">${object.company_id.name}</span> using <span style="color: #3F5D7E; font-weight: bold;">Odex</span>
|
||||||
|
</p>
|
||||||
|
<p style="text-align: center; color: #888; font-size: 12px;">
|
||||||
|
${object.company_id.phone or ''}
|
||||||
|
% if object.company_id.email:
|
||||||
|
| ${object.company_id.email}
|
||||||
|
% endif
|
||||||
|
% if object.company_id.website:
|
||||||
|
| ${object.company_id.website}
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div></field>
|
||||||
|
<field name="report_template" ref="purchase.action_report_purchase_order"/>
|
||||||
|
<field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
|
||||||
|
<field name="lang">${object.partner_id.lang}</field>
|
||||||
|
<field name="auto_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Override the button template to use Odex blue color -->
|
||||||
|
<!-- Using attributes replacement instead of full element replacement -->
|
||||||
|
<template id="mail_notification_confirm_custom" inherit_id="purchase.mail_notification_confirm" name="Purchase: Confirmation mail notification template - Odex Blue">
|
||||||
|
<!-- Add CSS style to override button colors globally -->
|
||||||
|
<xpath expr="//t[@t-set='access_name']" position="before">
|
||||||
|
<style>
|
||||||
|
a[style*="background-color: #875A7B"] {
|
||||||
|
background-color: #3F5D7E !important;
|
||||||
|
border-color: #3F5D7E !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Loading…
Reference in New Issue