You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="qweb_mail_pdf_export" model="ir.actions.report.xml">
  4. <field name="name">mail_as_letter</field>
  5. <field name="model">mail.compose.message</field>
  6. <field name="type">ir.actions.report.xml</field>
  7. <field name="report_name">mail_as_letter.report_mail_print</field>
  8. <field name="report_type">qweb-pdf</field>
  9. <field name="paperformat_id" eval="ref('report.paperformat_euro')"/>
  10. <field name="auto" eval="False"/>
  11. </record>
  12. <template id="mail_print">
  13. <t t-call="report.external_layout">
  14. <div class="page">
  15. <div class="oe_structure"/>
  16. <t t-foreach="o.partner_ids" t-as="p">
  17. <div class="col-xs-5 col-xs-offset-7">
  18. <address t-field="o.partner_ids"
  19. t-field-options='{"widget": "contact",
  20. "fields": ["address", "name"],
  21. "no_marker": true}' />
  22. </div>
  23. </t>
  24. <br/>
  25. <p>
  26. <b>Subject : <span t-field="o.subject" /></b>
  27. </p>
  28. <br/>
  29. <p>
  30. <span class="email_preview" t-raw="o.body" />
  31. </p>
  32. </div>
  33. </t>
  34. </template>
  35. <template id="report_mail_print">
  36. <t t-call="report.html_container">
  37. <t t-foreach="docs" t-as="o">
  38. <t t-call="mail_as_letter.mail_print"/>
  39. </t>
  40. </t>
  41. </template>
  42. </odoo>