diff options
| author | Thibault Delavallée <tde@openerp.com> | 2015-10-28 18:10:09 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-11-02 11:51:09 +0100 |
| commit | 7fe9d58b0d890d714d690a5e17bd3ef31bcc47ba (patch) | |
| tree | 701174dd85a174be8b5adc12bc3cc72844d25e89 /addons/purchase/data/mail_template_data.xml | |
| parent | b52069754dbfaefb77fdb5e2765de5273cc1381b (diff) | |
[IMP] invoice, sale, purchase: template update
Templates used to send invoice / quotation / PO by email are cleaned. Custom
style is removed. Content is simplified.
For sale, only one template is kept through the various addons. Previously to
this commit there are 3 templates: standard, portal and online quote. Those
template are similar except the link to get the sale order. Now the base template
contains some logic that should be sufficient to cover all cases. This breaks
the modular approach but is easier to use for users. As templates are still mako
it is not possible to use inheritance. So having a base template knowing some bits
of overriding modules is necessary if we want to avoid having the same template
duplicated.
Diffstat (limited to 'addons/purchase/data/mail_template_data.xml')
| -rw-r--r-- | addons/purchase/data/mail_template_data.xml | 135 |
1 files changed, 40 insertions, 95 deletions
diff --git a/addons/purchase/data/mail_template_data.xml b/addons/purchase/data/mail_template_data.xml index 1a743871538..35188397f11 100644 --- a/addons/purchase/data/mail_template_data.xml +++ b/addons/purchase/data/mail_template_data.xml @@ -14,54 +14,27 @@ <field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field> <field name="lang">${object.partner_id.lang}</field> <field name="body_html"><![CDATA[ -<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> +<p>Dear +% if object.partner_id.company_type == 'company' and object.child_ids: + ${object.partner_id.child_ids[0].name} +% else : + ${object.partner_id.name} +% endif +,</p><p> +Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong> +% if object.partner_ref: + with reference: ${object.partner_ref} +% endif +% if object.origin: + (RFQ origin: ${object.origin}) +% endif +amounting <strong>${object.amount_total} ${object.currency_id.name}</strong> +from ${object.company_id.name}. +</p> - <p>Hello ${object.partner_id.name},</p> - - <p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p> - - <p style="border-left: 1px solid #8e0000; margin-left: 30px;"> - <strong>REFERENCES</strong><br /> - RFQ number: <strong>${object.name}</strong><br /> - RFQ date: ${object.date_order}<br /> - % if object.origin: - RFQ reference: ${object.origin}<br /> - % endif - % if object.partner_ref: - Your reference: ${object.partner_ref}<br /> - % endif - % if object.create_uid: - Your contact: <a href="mailto:${object.create_uid.email or ''}?subject=Order%20${object.name}">${object.create_uid.name}</a> - % endif - </p> - - <br/> - <p>If you have any question, do not hesitate to contact us.</p> - <p>Thank you!</p> - <br/> - <br/> - <div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;"> - <h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;"> - <strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3> - </div> - <div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;"> - <span style="color: #222; margin-bottom: 5px; display: block; "> - ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} - </span> - % if object.company_id.phone: - <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> - Phone: ${object.company_id.phone} - </div> - % endif - % if object.company_id.website: - <div> - Web : <a href="${object.company_id.website}">${object.company_id.website}</a> - </div> - %endif - <p></p> - </div> -</div> - ]]></field> +<p>If you have any question, do not hesitate to contact us.</p> +<p>Best regards,</p> +]]></field> </record> @@ -77,55 +50,27 @@ <field name="report_name">PO_${(object.name or '').replace('/','_')}</field> <field name="lang">${object.partner_id.lang}</field> <field name="body_html"><![CDATA[ -<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> - - <p>Hello ${object.partner_id.name},</p> - - <p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p> - - <p style="border-left: 1px solid #8e0000; margin-left: 30px;"> - <strong>REFERENCES</strong><br /> - Order number: <strong>${object.name}</strong><br /> - Order total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br /> - Order date: ${object.date_order}<br /> - % if object.origin: - Order reference: ${object.origin}<br /> - % endif - % if object.partner_ref: - Your reference: ${object.partner_ref}<br /> - % endif - % if object.create_uid: - Your contact: <a href="mailto:${object.create_uid.email or ''}?subject=Order%20${object.name}">${object.create_uid.name}</a> - % endif - </p> +<p>Dear +% if object.partner_id.company_type == 'company' and object.child_ids: + ${object.partner_id.child_ids[0].name} +% else : + ${object.partner_id.name} +% endif +,</p><p> +Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong> +% if object.partner_ref: + with reference: ${object.partner_ref} +% endif +% if object.origin: + (RFQ origin: ${object.origin}) +% endif +amounting <strong>${object.amount_total} ${object.currency_id.name}</strong> +from ${object.company_id.name}. +</p> - <br/> - <p>If you have any question, do not hesitate to contact us.</p> - <p>Thank you!</p> - <br/> - <br/> - <div style="width: 375px; margin: 0px; padding: 0px; background-color: #8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; background-repeat: repeat no-repeat;"> - <h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;"> - <strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3> - </div> - <div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;"> - <span style="color: #222; margin-bottom: 5px; display: block; "> - ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} - </span> - % if object.company_id.phone: - <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> - Phone: ${object.company_id.phone} - </div> - % endif - % if object.company_id.website: - <div> - Web : <a href="${object.company_id.website}">${object.company_id.website}</a> - </div> - %endif - <p></p> - </div> -</div> - ]]></field> +<p>If you have any question, do not hesitate to contact us.</p> +<p>Best regards,</p> +]]></field> </record> </data> |
