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.

98 lines
3.4 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2017 LasLabs Inc.
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. -->
  6. <odoo noupdate="1">
  7. <record id="mail_template_auto_pay_retry" model="mail.template">
  8. <field name="name">Invoice - AutoPay To Retry</field>
  9. <field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
  10. <field name="subject">Automatic Payment Failure (Ref ${object.number or 'n/a'})</field>
  11. <field name="partner_to">${object.partner_id.id}</field>
  12. <field name="model_id" ref="account.model_account_invoice"/>
  13. <field name="auto_delete" eval="True"/>
  14. <field name="report_template" ref="account.account_invoices"/>
  15. <field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
  16. <field name="lang">${object.partner_id.lang}</field>
  17. <field name="body_html"><![CDATA[
  18. <p>
  19. Hello ${object.partner_id.name}
  20. % set access_action = object.get_access_action()
  21. % set access_url = access_action['type'] == 'ir.actions.act_url' and access_action['url'] or '/report/pdf/account.report_invoice/' + str(object.id)
  22. % if object.partner_id.parent_id:
  23. (<i>${object.partner_id.parent_id.name}</i>)
  24. % endif
  25. ,
  26. </p>
  27. <p>
  28. The automatic payment for your invoice
  29. <a href="${access_url}">
  30. <strong>
  31. ${object.number}
  32. </strong>
  33. % if object.origin:
  34. (with reference: ${object.origin} )
  35. % endif
  36. </a>
  37. failed.
  38. </p>
  39. <p>
  40. Please verify that your payment information is correct, and that funds are
  41. available in the account.
  42. </p>
  43. ]]>
  44. </field>
  45. </record>
  46. <record id="mail_template_auto_pay_fail" model="mail.template">
  47. <field name="name">Invoice - AutoPay Failed</field>
  48. <field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
  49. <field name="subject">Automatic Payment Failure (Ref ${object.number or 'n/a'})</field>
  50. <field name="partner_to">${object.partner_id.id}</field>
  51. <field name="model_id" ref="account.model_account_invoice"/>
  52. <field name="auto_delete" eval="True"/>
  53. <field name="report_template" ref="account.account_invoices"/>
  54. <field name="report_name">Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
  55. <field name="lang">${object.partner_id.lang}</field>
  56. <field name="body_html"><![CDATA[
  57. <p>
  58. Hello ${object.partner_id.name}
  59. % set access_action = object.get_access_action()
  60. % set access_url = access_action['type'] == 'ir.actions.act_url' and access_action['url'] or '/report/pdf/account.report_invoice/' + str(object.id)
  61. % if object.partner_id.parent_id:
  62. (<i>${object.partner_id.parent_id.name}</i>)
  63. % endif
  64. ,
  65. </p>
  66. <p>
  67. The automatic payment for your invoice
  68. <a href="${access_url}">
  69. <strong>
  70. ${object.number}
  71. </strong>
  72. % if object.origin:
  73. (with reference: ${object.origin} )
  74. % endif
  75. </a>
  76. failed.
  77. </p>
  78. <p>
  79. Please verify that your payment information is correct, and that funds are
  80. available in the account.
  81. </p>
  82. ]]>
  83. </field>
  84. </record>
  85. </odoo>