[DATA] ~'send by email' message template
authorLudovic CHEVALIER <ludovic@beurresarrasin.net>
Sun, 27 Sep 2015 08:29:08 +0000 (10:29 +0200)
committerLudovic CHEVALIER <ludovic@beurresarrasin.net>
Sun, 27 Sep 2015 08:29:08 +0000 (10:29 +0200)
__openerp__.py
data/account.xml [new file with mode: 0644]

index 02e9b8e..cdba7f8 100644 (file)
@@ -42,6 +42,7 @@ Module pour les personnalisations de L'Heureux Cyclage
     'update_xml': [
         'security/lhc_custom_oe_security.xml',
         'security/ir.model.access.csv',
+        'data/account.xml',
         'data/wiki.xml',
         'view/account_invoice.xml',
         'view/account.xml',
diff --git a/data/account.xml b/data/account.xml
new file mode 100644 (file)
index 0000000..667d7a6
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="account.email_template_edi_invoice" model="email.template">
+            <field name="subject">${object.company_id.name|safe} - Facture ${object.number or 'n/a'}</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>Bonjour ${object.partner_id.name},</p>
+
+    <p>Voici une facture pour vous: </p>
+....
+    <p style="border-left: 1px solid #8e0000; margin-left: 30px;">
+       &nbsp;&nbsp;<strong>REFERENCES</strong><br />
+       &nbsp;&nbsp;Numéro de facture: <strong>${object.number}</strong><br />
+       &nbsp;&nbsp;Montant total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br />
+       &nbsp;&nbsp;Date: ${object.date_invoice}<br />
+       % if object.origin:
+       &nbsp;&nbsp;Référence du devis: ${object.origin}<br />
+       % endif
+       % if object.user_id:
+       &nbsp;&nbsp;Contact: <a href="mailto:${object.user_id.email or ''}?subject=Invoice%20${object.number}">${object.user_id.name}</a>
+       % endif
+    </p>..
+....
+    <br/>
+     <p>Si vous avez une question, n'hésitez pas à me contacter.</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; backgroun
+         <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; ">
+         % if object.company_id.street:
+             ${object.company_id.street}<br/>
+         % endif
+         % if object.company_id.street2:
+             ${object.company_id.street2}<br/>
+         % endif
+         % if object.company_id.city or object.company_id.zip:
+             ${object.company_id.zip} ${object.company_id.city}<br/>
+         % 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 ''}<br/>
+         % endif
+         </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; pad
+                 Phone:&nbsp; ${object.company_id.phone}
+             </div>
+         % endif
+         % if object.company_id.website:
+             <div>
+                 Web :&nbsp;<a href="${object.company_id.website}">${object.company_id.website}</a>
+             </div>
+         %endif
+         <p></p>
+     </div>
+ </div>
+                ]]></field>
+        </record>
+    </data>
+</openerp>