2 <!-- Mail template is done in a NOUPDATE block
3 so users can freely customize/delete them -->
7 <record id="email_template_edi_sale" model="email.template">
8 <field name="name">Sales Order - Send by Email (Portal)</field>
9 <field name="email_from">${object.user_id.email or ''}</field>
10 <field name="subject">${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
11 <field name="partner_to">${object.partner_invoice_id.id}</field>
12 <field name="model_id" ref="sale.model_sale_order"/>
13 <field name="auto_delete" eval="True"/>
14 <field name="report_template" ref="sale.report_sale_order"/>
15 <field name="report_name">${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
16 <field name="body_html"><![CDATA[
17 <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
19 <p>Hello ${object.partner_id.name},</p>
21 <p>Here is your ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'} from ${object.company_id.name}: </p>
23 <p style="border-left: 1px solid #8e0000; margin-left: 30px;">
24 <strong>REFERENCES</strong><br />
25 Order number: <strong>${object.name}</strong><br />
26 Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
27 Order date: ${object.date_order}<br />
29 Order reference: ${object.origin}<br />
31 % if object.client_order_ref:
32 Your reference: ${object.client_order_ref}<br />
35 Your contact: <a href="mailto:${object.user_id.email or ''}?subject=Order%20${object.name}">${object.user_id.name}</a>
39 <% set signup_url = object.get_signup_url() %>
42 You can access this document and pay online via our Customer Portal:
44 <a style="display:block; width: 150px; height:20px; margin-left: 120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; text-align: center; text-decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat no-repeat;"
45 href="${signup_url}">View ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'}</a>
48 % if object.paypal_url:
50 <p>It is also possible to directly pay with Paypal:</p>
51 <a style="margin-left: 120px;" href="${object.paypal_url}">
52 <img class="oe_edi_paypal_button" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"/>
57 <p>If you have any question, do not hesitate to contact us.</p>
58 <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>
61 <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;">
62 <h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
63 <strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
65 <div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">
66 <span style="color: #222; margin-bottom: 5px; display: block; ">
67 % if object.company_id.street:
68 ${object.company_id.street}<br/>
70 % if object.company_id.street2:
71 ${object.company_id.street2}<br/>
73 % if object.company_id.city or object.company_id.zip:
74 ${object.company_id.zip} ${object.company_id.city}<br/>
76 % if object.company_id.country_id:
77 ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}<br/>
80 % if object.company_id.phone:
81 <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; ">
82 Phone: ${object.company_id.phone}
85 % if object.company_id.website:
87 Web : <a href="${object.company_id.website}">${object.company_id.website}</a>
96 <record id="email_template_edi_invoice" model="email.template">
97 <field name="name">Invoice - Send by Email (Portal)</field>
98 <field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field>
99 <field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
100 <field name="partner_to">${object.partner_id.id}</field>
101 <field name="model_id" ref="account.model_account_invoice"/>
102 <field name="auto_delete" eval="True"/>
103 <field name="report_template" ref="account.account_invoices"/>
104 <field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
105 <field name="body_html"><![CDATA[
106 <div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255); ">
108 <p>Hello ${object.partner_id.name},</p>
110 <p>A new invoice is available for you: </p>
112 <p style="border-left: 1px solid #8e0000; margin-left: 30px;">
113 <strong>REFERENCES</strong><br />
114 Invoice number: <strong>${object.number}</strong><br />
115 Invoice total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br />
116 Invoice date: ${object.date_invoice}<br />
118 Order reference: ${object.origin}<br />
121 Your contact: <a href="mailto:${object.user_id.email or ''}?subject=Invoice%20${object.number}">${object.user_id.name}</a>
125 <% set signup_url = object.get_signup_url() %>
128 You can access the invoice document and pay online via our Customer Portal:
130 <a style="display:block; width: 150px; height:20px; margin-left: 120px; color: #DDD; font-family: 'Lucida Grande', Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; text-align: center; text-decoration: none !important; line-height: 1; padding: 5px 0px 0px 0px; background-color: #8E0000; border-radius: 5px 5px; background-repeat: repeat no-repeat;"
131 href="${signup_url}">View Invoice</a>
134 % if object.paypal_url:
136 <p>It is also possible to directly pay with Paypal:</p>
137 <a style="margin-left: 120px;" href="${object.paypal_url}">
138 <img class="oe_edi_paypal_button" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"/>
143 <p>If you have any question, do not hesitate to contact us.</p>
144 <p>Thank you for choosing ${object.company_id.name or 'us'}!</p>
147 <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;">
148 <h3 style="margin: 0px; padding: 2px 14px; font-size: 12px; color: #DDD;">
149 <strong style="text-transform:uppercase;">${object.company_id.name}</strong></h3>
151 <div style="width: 347px; margin: 0px; padding: 5px 14px; line-height: 16px; background-color: #F2F2F2;">
152 <span style="color: #222; margin-bottom: 5px; display: block; ">
153 % if object.company_id.street:
154 ${object.company_id.street}<br/>
156 % if object.company_id.street2:
157 ${object.company_id.street2}<br/>
159 % if object.company_id.city or object.company_id.zip:
160 ${object.company_id.zip} ${object.company_id.city}<br/>
162 % if object.company_id.country_id:
163 ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}<br/>
166 % if object.company_id.phone:
167 <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; ">
168 Phone: ${object.company_id.phone}
171 % if object.company_id.website:
173 Web : <a href="${object.company_id.website}">${object.company_id.website}</a>