From 7fe9d58b0d890d714d690a5e17bd3ef31bcc47ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 28 Oct 2015 18:10:09 +0100 Subject: [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. --- addons/purchase/data/mail_template_data.xml | 135 +++++++++------------------- 1 file changed, 40 insertions(+), 95 deletions(-) (limited to 'addons/purchase/data/mail_template_data.xml') 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 @@ RFQ_${(object.name or '').replace('/','_')} ${object.partner_id.lang} +

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 +,

+Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} ${object.name} +% if object.partner_ref: + with reference: ${object.partner_ref} +% endif +% if object.origin: + (RFQ origin: ${object.origin}) +% endif +amounting ${object.amount_total} ${object.currency_id.name} +from ${object.company_id.name}. +

-

Hello ${object.partner_id.name},

- -

Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}:

- -

-   REFERENCES
-   RFQ number: ${object.name}
-   RFQ date: ${object.date_order}
- % if object.origin: -   RFQ reference: ${object.origin}
- % endif - % if object.partner_ref: -   Your reference: ${object.partner_ref}
- % endif - % if object.create_uid: -   Your contact: ${object.create_uid.name} - % endif -

- -
-

If you have any question, do not hesitate to contact us.

-

Thank you!

-
-
-
-

- ${object.company_id.name}

-
-
- - ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} - - % if object.company_id.phone: -
- Phone:  ${object.company_id.phone} -
- % endif - % if object.company_id.website: -
- Web : ${object.company_id.website} -
- %endif -

-
- - ]]>
+

If you have any question, do not hesitate to contact us.

+

Best regards,

+]]> @@ -77,55 +50,27 @@ PO_${(object.name or '').replace('/','_')} ${object.partner_id.lang} - -

Hello ${object.partner_id.name},

- -

Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}:

- -

-   REFERENCES
-   Order number: ${object.name}
-   Order total: ${object.amount_total} ${object.currency_id.name}
-   Order date: ${object.date_order}
- % if object.origin: -   Order reference: ${object.origin}
- % endif - % if object.partner_ref: -   Your reference: ${object.partner_ref}
- % endif - % if object.create_uid: -   Your contact: ${object.create_uid.name} - % endif -

+

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 +,

+Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} ${object.name} +% if object.partner_ref: + with reference: ${object.partner_ref} +% endif +% if object.origin: + (RFQ origin: ${object.origin}) +% endif +amounting ${object.amount_total} ${object.currency_id.name} +from ${object.company_id.name}. +

-
-

If you have any question, do not hesitate to contact us.

-

Thank you!

-
-
-
-

- ${object.company_id.name}

-
-
- - ${object.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} - - % if object.company_id.phone: -
- Phone:  ${object.company_id.phone} -
- % endif - % if object.company_id.website: -
- Web : ${object.company_id.website} -
- %endif -

-
- - ]]>
+

If you have any question, do not hesitate to contact us.

+

Best regards,

+]]> -- cgit v1.2.3