From 777f215edb7a0ce29f6724ad0792eb1d02b7d592 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 20 Nov 2015 14:29:29 +0100 Subject: [PATCH] [FIX] website_quote: quote email template When there is a quote template set on a sale order, the email sent by default is the email `Sales Order - Send by Email (Online Quote)`, and this since 5153b2d281fd1af5529c6347faf3c95da83571b2. Therefore, there is no point to override the content of the email template `Sales Order - Send by Email` to set the quotation link in the email template, since this is not this email which is being used for sales order with an online quotation template. Nevertheless, the link to the email quotation must be put in the `Sales Order - Send by Email (Online Quote)`, so the customer can access his online quotation directly from the confirmation email, as it was designed and done in the override of the `Sales Order - Send by Email`. opw-657060 --- .../data/website_quotation_data.xml | 123 +++--------------- 1 file changed, 17 insertions(+), 106 deletions(-) diff --git a/addons/website_quote/data/website_quotation_data.xml b/addons/website_quote/data/website_quotation_data.xml index 05802f6a8b7..32728b09f69 100644 --- a/addons/website_quote/data/website_quotation_data.xml +++ b/addons/website_quote/data/website_quotation_data.xml @@ -1,16 +1,24 @@ - - - - - + + + + + Sales Order - Send by Email (Online Quote) + ${(object.user_id.email or '')|safe} + ${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) + ${object.partner_invoice_id.id} + + + + ${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''} + ${object.partner_id.lang} + +

Hello ${object.partner_id.name},

- +

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

@@ -42,103 +50,6 @@ % endif -
-

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

-

Thank you for choosing ${object.company_id.name or 'us'}!

-
-
-
-

- ${object.company_id.name}

-
-
- - % if object.company_id.street: - ${object.company_id.street}
- % endif - % if object.company_id.street2: - ${object.company_id.street2}
- % endif - % if object.company_id.city or object.company_id.zip: - ${object.company_id.zip} ${object.company_id.city}
- % endif - % if object.company_id.country_id: - ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
- % endif -
- % if object.company_id.phone: -
- Phone:  ${object.company_id.phone} -
- % endif - % if object.company_id.website: - - %endif -

-
-
- ]]>
-
- -
- - - - - - Sales Order - Send by Email (Online Quote) - ${(object.user_id.email or '')|safe} - ${object.company_id.name|safe} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) - ${object.partner_invoice_id.id} - - - - ${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''} - ${object.partner_id.lang} - - - -

Hello ${object.partner_id.name},

- -

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

- -

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

- - % set signup_url = object.get_signup_url() - % if signup_url: -

- You can access this document and pay online via our Customer Portal: -

- View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} - % endif - - % if object.paypal_url: -
-

It is also possible to directly pay with Paypal:

- - - - % endif -

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

Thank you for choosing ${object.company_id.name or 'us'}!